Cleaning documentElement/genericElement interfaces
[fnpeditor.git] / src / editor / modules / documentCanvas / canvas / documentElement.js
index 99e97d0..a08788b 100644 (file)
@@ -189,6 +189,15 @@ $.extend(DocumentTextElement.prototype, {
         this.canvas = null;
         return this;
     },
         this.canvas = null;
         return this;
     },
+    handle: function(event) {
+        var toSet = event.meta.node.getText();
+        if(toSet === '') {
+            toSet = utils.unicode.ZWS;
+        }
+        if(toSet !== this.getText()) {
+            this.setText(toSet);
+        }
+    },
     setText: function(text) {
         this.dom.contents()[0].data = text;
     },
     setText: function(text) {
         this.dom.contents()[0].data = text;
     },