X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/8c9d3b6afa002ad4db684dadcf8a50ca27f8701d..b6f093b37e3b4d72890f028f1d0d4285958c045e:/modules/documentCanvas/canvas/documentElement.js?ds=inline diff --git a/modules/documentCanvas/canvas/documentElement.js b/modules/documentCanvas/canvas/documentElement.js index 7dd1f7d..0558a3e 100644 --- a/modules/documentCanvas/canvas/documentElement.js +++ b/modules/documentCanvas/canvas/documentElement.js @@ -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; },