X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/c62820ef529ff40e46d30aedff2ba870e8e18395..7bc06393365fdffe695cef6dd825edf4ce521919:/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; },