From: Aleksander Ɓukasz Date: Wed, 14 May 2014 14:19:50 +0000 (+0200) Subject: editor: plugins/core support for Node.object.describesParent X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/5952990eee08ffd82ee5e8ecd3f840dacf222ef6 editor: plugins/core support for Node.object.describesParent --- diff --git a/src/editor/plugins/core/core.js b/src/editor/plugins/core/core.js index bbc27ac..c12405b 100644 --- a/src/editor/plugins/core/core.js +++ b/src/editor/plugins/core/core.js @@ -26,6 +26,14 @@ plugin.documentExtension.textNode.transformations = { return true; // break } }); + newNodes.second.contents() + .filter(function(child) { + return child.object.describesParent; + }) + .forEach(function(child) { + //child.detach(); + newNodes.first.append(child); + }); return _.extend(newNodes, {emptyText: emptyText}); }, getChangeRoot: function() {