Refactoring visualEditor module
[fnpeditor.git] / modules / visualEditor.transformations.js
1 rng.modules.visualEditor.transformations = {};
2
3 rng.modules.visualEditor.transformations.fromXML = {
4     getHTMLTree: function(xml) {
5         return xml;
6     },
7     getMetaData: function(xml) {
8         return {};
9     },
10     getDocumentDescription: function(xml) {
11         return {
12             HTMLTree: this.getHTMLTree(xml),
13             metadata: this.getMetaData(xml)
14         }
15     }
16
17 }
18
19 rng.modules.visualEditor.transformations.toXML = {
20     getXML: function(documentDescription) {
21         return documentDescription.HTMLTree;
22     }
23 }