Initial commit

This commit is contained in:
ECAILLE Fabrice (externe)
2017-05-03 16:46:01 +02:00
commit 2e64cb961e
117 changed files with 10765 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
define(['durandal/app', 'knockout', 'highlightjs'], function (app, ko) {
var type = ko.observable(),
content = ko.observable();
var sub = app.on('filebrowser:open_file').then(function(message) {
type(message.type);
if( message.type === "json" ) {
content(ko.utils.stringifyJson(message.content));
} else {
content(message.content);
}
hljs.highlightBlock($('#editor')[0]);
}, this);
return {
attached: function () {
hljs.configure({
tabReplace: ' '
});
hljs.initHighlighting();
},
type: type,
content: content
};
});