X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/264005bc6b4f629d4ef7d32c0aa626e3da7afbc7..ae032450627538fabf7df31fbda6cf7bd097b94f:/src/editor/modules/documentCanvas/canvas/documentElement.js?ds=sidebyside diff --git a/src/editor/modules/documentCanvas/canvas/documentElement.js b/src/editor/modules/documentCanvas/canvas/documentElement.js index b5269ca..60e79de 100644 --- a/src/editor/modules/documentCanvas/canvas/documentElement.js +++ b/src/editor/modules/documentCanvas/canvas/documentElement.js @@ -229,19 +229,11 @@ $.extend(DocumentNodeElement.prototype, { var elementContent = this._container().contents(); var element = this; - elementContent.each(function(idx) { + elementContent.each(function() { var childElement = DocumentElement.fromHTMLElement(this, element.canvas); if(childElement === undefined) { return true; } - if(idx === 0 && elementContent.length > 1 && elementContent[1].nodeType === Node.ELEMENT_NODE && (childElement instanceof DocumentTextElement) && $.trim($(this).text()) === '') { - return true; - } - if(idx > 0 && childElement instanceof DocumentTextElement) { - if(toret[toret.length-1] instanceof DocumentNodeElement && $.trim($(this).text()) === '') { - return true; - } - } toret.push(childElement); }); return toret;