editor: plugins/core support for Node.object.describesParent
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 14 May 2014 14:19:50 +0000 (16:19 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 28 May 2014 12:45:58 +0000 (14:45 +0200)
src/editor/plugins/core/core.js

index bbc27ac..c12405b 100644 (file)
@@ -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() {