integration wip: handling nodeTextChange event
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 19 Nov 2013 14:39:24 +0000 (15:39 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 2 Dec 2013 13:50:53 +0000 (14:50 +0100)
src/editor/modules/documentCanvas/canvas/wlxmlListener.js

index 35bc45f..8bd05a5 100644 (file)
@@ -61,6 +61,10 @@ var handlers = {
     nodeDetached: function(event) {
         var canvasNode = utils.findCanvasElementInParent(event.meta.node, event.meta.parent);
         canvasNode.detach();
     nodeDetached: function(event) {
         var canvasNode = utils.findCanvasElementInParent(event.meta.node, event.meta.parent);
         canvasNode.detach();
+    },
+    nodeTextChange: function(event) {
+        var canvasElement = utils.findCanvasElement(event.meta.node);
+        canvasElement.setText(event.meta.node.getText());
     }
 };
 
     }
 };