3 return function(sandbox) {
\r
5 var view = $(sandbox.getTemplate('main')());
\r
8 var editor = ace.edit(view.find('#rng-sourceEditor-editor')[0]);
\r
9 editor.setTheme("ace/theme/chrome");
\r
10 editor.getSession().setMode("ace/mode/xml");
\r
11 $('textarea', view).on('keyup', function() {
\r
15 editor.getSession().on('change', function() {
\r
20 sandbox.publish('ready');
\r
22 getView: function() {
\r
25 setDocument: function(document) {
\r
26 editor.setValue(document);
\r
30 getDocument: function() {
\r
31 return editor.getValue();
\r
33 isDirty: function() {
\r
36 setDirty: function(dirty) {
\r