Fixing left/right arrow support in empty text element
[fnpeditor.git] / modules / documentCanvas / canvas / documentElement.js
index 7dd1f7d..0558a3e 100644 (file)
@@ -148,8 +148,10 @@ $.extend(DocumentNodeElement, {
         }
         element.data('other-attrs', params.others);
 
-        if(params.rawChildren) {
+        if(params.rawChildren && params.rawChildren.length) {
             container.append(params.rawChildren);
+        } else if(params.prepopulateOnEmpty) {
+            element.append(DocumentTextElement.create({text: ''}));
         }
         return dom;
     },