1 rng.modules.visualEditor = function(sandbox) {
\r
2 var transformations = rng.modules.visualEditor.transformations;
\r
4 var view = $(sandbox.getTemplate('main')());
\r
8 $('#rng-visualEditor-content', view).on('keyup', function() {
\r
14 sandbox.publish('ready');
\r
16 getView: function() {
\r
19 setDocument: function(xml) {
\r
20 var transformed = transformations.fromXML.getDocumentDescription(xml);
\r
21 $('#rng-visualEditor-content', view).html(transformed.HTMLTree);
\r
24 getDocument: function() {
\r
25 return transformations.toXML.getXML({HTMLTree: $('#rng-visualEditor-content').text(), metadata: {}});
\r
27 isDirty: function() {
\r
30 setDirty: function(dirty) {
\r