X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/8c9d3b6afa002ad4db684dadcf8a50ca27f8701d..9a7ea3b25b1989eeb004820bfa8c939426599c8a:/modules/documentCanvas/canvas/documentElement.js 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; },