X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/4a10da821d96b8e462cc9db5e74e2507445eee76..7bc06393365fdffe695cef6dd825edf4ce521919:/modules/sourceEditor/sourceEditor.js?ds=sidebyside diff --git a/modules/sourceEditor/sourceEditor.js b/modules/sourceEditor/sourceEditor.js index 1c18e75..2fca370 100644 --- a/modules/sourceEditor/sourceEditor.js +++ b/modules/sourceEditor/sourceEditor.js @@ -1,37 +1,37 @@ -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(); - } - }; -}; - +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