integration wip: togglegrid, newnode
[fnpeditor.git] / modules / documentCanvas / canvas / canvas.js
index ad294b8..c4bfc09 100644 (file)
@@ -116,7 +116,7 @@ $.extend(Canvas.prototype, {
         return wrapperElement;
     },
     getDocumentElement: function(from) {
         return wrapperElement;
     },
     getDocumentElement: function(from) {
-        if(from instanceof HTMLElement) {
+        if(from instanceof HTMLElement || from instanceof Text) {
            return documentElement.wrap(from, this);
         }
     },
            return documentElement.wrap(from, this);
         }
     },