X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/cd02846fc9db03e6d9a2add20150b8808a66d850..0990bc1dc7fad5165148a8993901138de9e22d0e:/src/editor/modules/documentCanvas/canvas/canvas.js?ds=inline diff --git a/src/editor/modules/documentCanvas/canvas/canvas.js b/src/editor/modules/documentCanvas/canvas/canvas.js index b0d461b..48f03de 100644 --- a/src/editor/modules/documentCanvas/canvas/canvas.js +++ b/src/editor/modules/documentCanvas/canvas/canvas.js @@ -65,8 +65,10 @@ $.extend(Canvas.prototype, { observer.observe(canvas.d[0], config); canvas.publisher('contentChanged'); - var textElement = canvas.getDocumentElement(mutation.target); - textElement.data('wlxmlNode').setText(mutation.target.data); + var textElement = canvas.getDocumentElement(mutation.target), + toSet = mutation.target.data !== utils.unicode.ZWS ? mutation.target.data : ''; + + textElement.data('wlxmlNode').setText(toSet); } }); });