canvas: fix
[fnpeditor.git] / src / editor / modules / data / data.js
index 38a80a9..7d0837b 100644 (file)
@@ -37,7 +37,7 @@ return function(sandbox) {
     var loadDocument = function(text, isDraft, draftTimestamp) {
         logger.debug('loading document');
         try {
-            wlxmlDocument = wlxml.WLXMLDocumentFromXML(text, {}, Document);
+            wlxmlDocument = wlxml.WLXMLDocumentFromXML(text, {editorConfig: sandbox.getConfig()}, Document);
         } catch(e) {
             logger.exception(e);
             alert(gettext('This document contains errors and can\'t be loaded. :(')); // TODO
@@ -263,7 +263,7 @@ return function(sandbox) {
                                 return key !== 'document';
                             })
                             .forEach(function(key) {
-                                documentProperties = data[key];
+                                documentProperties[key] = data[key];
                             });
                         reloadHistory();
                         wlxmlDocument.loadXML(data.document);