X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/95f83648504b6552ff3cbf956f55c6bf5f542a9b..efe36f4f1b5df351eeb4d40a54c3900cf9a7079b:/modules/sourceEditor/sourceEditor.js diff --git a/modules/sourceEditor/sourceEditor.js b/modules/sourceEditor/sourceEditor.js deleted file mode 100644 index 431fcb8..0000000 --- a/modules/sourceEditor/sourceEditor.js +++ /dev/null @@ -1,37 +0,0 @@ -define(function() { - -'use strict'; - -return function(sandbox) { - - var view = $(sandbox.getTemplate('main')()); - - var editor = ace.edit(view.find('#rng-sourceEditor-editor')[0]); - editor.setTheme("ace/theme/chrome"); - editor.getSession().setMode("ace/mode/xml"); - $('textarea', view).on('keyup', function() { - sandbox.publish('xmlChanged'); - }); - - editor.getSession().on('change', function() { - sandbox.publish('xmlChanged'); - }) - return { - start: function() { - sandbox.publish('ready'); - }, - getView: function() { - return view; - }, - setDocument: function(document) { - editor.setValue(document); - editor.gotoLine(0) - sandbox.publish('documentSet'); - }, - getDocument: function() { - return editor.getValue(); - } - } -}; - -}); \ No newline at end of file