integration wip: sync canvas text editing with wlxml document instance
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 24 Oct 2013 09:32:09 +0000 (11:32 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 2 Dec 2013 13:50:52 +0000 (14:50 +0100)
src/editor/modules/documentCanvas/canvas/canvas.js

index 830db75..ed24cee 100644 (file)
@@ -63,6 +63,9 @@ $.extend(Canvas.prototype, {
                     }
                     observer.observe(canvas.d[0], config);
                     canvas.publisher('contentChanged');
+
+                    var textElement = canvas.getDocumentElement(mutation.target);
+                    textElement.data('wlxmlNode').setText(mutation.target.data);
                 }
             });
         });