Index: gc_lang/fr/webext/content_scripts/panel_gc.js ================================================================== --- gc_lang/fr/webext/content_scripts/panel_gc.js +++ gc_lang/fr/webext/content_scripts/panel_gc.js @@ -469,10 +469,16 @@ iStart = iEnd+1; } this.dParagraph.set(i, sText.slice(iStart)); //console.log("Paragraphs number: " + (i+1)); } + + eraseContent () { + while (this.xNode.firstChild) { + this.xNode.removeChild(this.xNode.firstChild); + } + } write () { if (this.xNode !== null) { let sText = ""; if (this.bTextArea) { @@ -479,13 +485,20 @@ this.dParagraph.forEach(function (val, key) { sText += val + "\n"; }); this.xNode.value = sText.slice(0,-1).normalize("NFC"); } else { + this.eraseContent(); + this.dParagraph.forEach((val, key) => { + this.xNode.appendChild(document.createTextNode(val.normalize("NFC"))); + this.xNode.appendChild(document.createElement("br")); + }); + /* this.dParagraph.forEach(function (val, key) { sText += val + "
"; }); this.xNode.innerHTML = sText.normalize("NFC"); + */ } } } }