3 return function(sandbox) {
\r
5 var view = $(sandbox.getTemplate('main')());
\r
7 var editor = ace.edit(view.find('#rng-sourceEditor-editor')[0]);
\r
8 editor.setTheme("ace/theme/chrome");
\r
9 editor.getSession().setMode("ace/mode/xml");
\r
10 $('textarea', view).on('keyup', function() {
\r
11 sandbox.publish('xmlChanged');
\r
14 editor.getSession().on('change', function() {
\r
15 sandbox.publish('xmlChanged');
\r
19 sandbox.publish('ready');
\r
21 getView: function() {
\r
24 setDocument: function(document) {
\r
25 editor.setValue(document);
\r
27 sandbox.publish('documentSet');
\r
29 getDocument: function() {
\r
30 return editor.getValue();
\r