fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
integration wip: sourceEditor module stops keeping its template in the hosting page...
[fnpeditor.git]
/
src
/
editor
/
modules
/
data
/
data.js
diff --git
a/src/editor/modules/data/data.js
b/src/editor/modules/data/data.js
index
7f60004
..
006bf0f
100644
(file)
--- a/
src/editor/modules/data/data.js
+++ b/
src/editor/modules/data/data.js
@@
-1,9
+1,10
@@
define([
'libs/jquery',
'./saveDialog',
define([
'libs/jquery',
'./saveDialog',
- 'wlxml/wlxml'
+ 'wlxml/wlxml',
+ 'wlxml/extensions/list/list'
-], function($, saveDialog, wlxml) {
+], function($, saveDialog, wlxml
, listExtension
) {
'use strict';
'use strict';
@@
-15,10
+16,17
@@
return function(sandbox) {
var history = sandbox.getBootstrappedData().history;
var wlxmlDocument = wlxml.WLXMLDocumentFromXML(sandbox.getBootstrappedData().document);
var history = sandbox.getBootstrappedData().history;
var wlxmlDocument = wlxml.WLXMLDocumentFromXML(sandbox.getBootstrappedData().document);
+
+ wlxmlDocument.registerExtension(listExtension);
+ sandbox.getPlugins().forEach(function(plugin) {
+ if(plugin.documentExtension) {
+ wlxmlDocument.registerExtension(plugin.documentExtension);
+ }
+ });
function readCookie(name) {
function readCookie(name) {
- /* global escape, unescape */
+ /* global escape, unescape
, document
*/
var nameEQ = escape(name) + '=';
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var nameEQ = escape(name) + '=';
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
@@
-108,6
+116,7
@@
return function(sandbox) {
success: function(data) {
document_version = data.current_version;
reloadHistory();
success: function(data) {
document_version = data.current_version;
reloadHistory();
+ wlxmlDocument.loadXML(data.document);
sandbox.publish('documentReverted', data);
},
});
sandbox.publish('documentReverted', data);
},
});