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