Represent empty wlxml nodes as DocumentNodeElement with empty DocumentTextElement
[fnpeditor.git] / modules / sourceEditor / sourceEditor.js
index 1c18e75..2fca370 100644 (file)
@@ -1,37 +1,37 @@
-define(function() {\r
-\r
-'use strict';\r
-\r
-return function(sandbox) {\r
-\r
-    var view = $(sandbox.getTemplate('main')());\r
-    \r
-    var editor = ace.edit(view.find('#rng-sourceEditor-editor')[0]);\r
-    editor.setTheme("ace/theme/chrome");\r
-    editor.getSession().setMode("ace/mode/xml");\r
-    $('textarea', view).on('keyup', function() {\r
-        sandbox.publish('xmlChanged');\r
-    });\r
-    \r
-    editor.getSession().on('change', function() {\r
-        sandbox.publish('xmlChanged');\r
-    });\r
-    return {\r
-        start: function() {\r
-            sandbox.publish('ready');\r
-        },\r
-        getView: function() {\r
-            return view;\r
-        },\r
-        setDocument: function(document) {\r
-            editor.setValue(document);\r
-            editor.gotoLine(0);\r
-            sandbox.publish('documentSet');\r
-        },\r
-        getDocument: function() {\r
-            return editor.getValue();\r
-        }\r
-    };\r
-};\r
-\r
+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