diff --git a/www/views/Extjs3/javascript/form/HtmlEditor.js b/www/views/Extjs3/javascript/form/HtmlEditor.js index f163744c2..14f384823 100644 --- a/www/views/Extjs3/javascript/form/HtmlEditor.js +++ b/www/views/Extjs3/javascript/form/HtmlEditor.js @@ -250,7 +250,9 @@ Ext.extend(GO.form.HtmlEditor, Ext.form.HtmlEditor, { } }); + console.warn(h != anchored); if(h != anchored) { + this.getEditorBody().innerHTML = anchored; this.restoreCursorPosition(); }else @@ -274,9 +276,9 @@ Ext.extend(GO.form.HtmlEditor, Ext.form.HtmlEditor, { range = sel.getRangeAt(0); el = doc.createElement("div"); - el.innerHTML = "
"; + el.innerHTML = ""; frag = doc.createDocumentFragment(); - while ((node = el.firstChildElement)) { + while ((node = el.firstChild)) { lastNode = frag.appendChild(node); } firstNode = frag.firstChild;