1 rng.modules.sourceEditor = function(sandbox) {
\r
3 var view = $(sandbox.getTemplate('main')());
\r
6 var editor = ace.edit(view.find('#rng-sourceEditor-editor')[0]);
\r
7 editor.setTheme("ace/theme/chrome");
\r
8 editor.getSession().setMode("ace/mode/xml");
\r
9 $('textarea', view).on('keyup', function() {
\r
13 editor.getSession().on('change', function() {
\r
18 sandbox.publish('ready');
\r
20 getView: function() {
\r
23 setDocument: function(document) {
\r
24 editor.setValue(document);
\r
28 getDocument: function() {
\r
29 return editor.getValue();
\r
31 isDirty: function() {
\r
34 setDirty: function(dirty) {
\r