Index: gc_lang/fr/webext/content_scripts/init.js ================================================================== --- gc_lang/fr/webext/content_scripts/init.js +++ gc_lang/fr/webext/content_scripts/init.js @@ -247,11 +247,11 @@ break; // Lexicographer commands case "rightClickLxgEditableNode": if (oGrammalecte.xRightClickedNode !== null) { oGrammalecte.startLxgPanel(); - sText = (oGrammalecte.xRightClickedNode.tagName == "TEXTAREA") ? oGrammalecte.xRightClickedNode.value : oGrammalecte.xRightClickedNode.textContent; + sText = (oGrammalecte.xRightClickedNode.tagName == "TEXTAREA") ? oGrammalecte.xRightClickedNode.value : oGrammalecte.xRightClickedNode.innerText; xGrammalectePort.postMessage({ sCommand: "getListOfTokens", dParam: {sText: sText.normalize("NFC")}, dInfo: {sTextAreaId: oGrammalecte.xRightClickedNode.id} }); Index: gc_lang/fr/webext/content_scripts/menu.js ================================================================== --- gc_lang/fr/webext/content_scripts/menu.js +++ gc_lang/fr/webext/content_scripts/menu.js @@ -29,11 +29,10 @@ }); } _createMenu (xNode) { try { - let sText = (xNode.tagName == "TEXTAREA") ? xNode.value : xNode.textContent; let xMenu = oGrammalecte.createNode("div", {id: this.sMenuId, className: "grammalecte_menu"}); let xCloseButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_close_button", textContent: "×"} ); xCloseButton.onclick = () => { this.switchMenu(); } xMenu.appendChild(xCloseButton); xMenu.appendChild(oGrammalecte.createNode("div", {className: "grammalecte_menu_header", textContent: "GRAMMALECTE"})); @@ -50,10 +49,11 @@ } // lexicographe let xLxgButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_item", textContent: "Lexicographe"}); xLxgButton.onclick = () => { this.switchMenu(); + let sText = (xNode.tagName == "TEXTAREA") ? xNode.value : xNode.innerText; oGrammalecte.startLxgPanel(); xGrammalectePort.postMessage({ sCommand: "getListOfTokens", dParam: {sText: sText}, dInfo: {sTextAreaId: xNode.id} @@ -62,10 +62,11 @@ xMenu.appendChild(xLxgButton); // Grammar checker let xGCButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_item", textContent: "Correction grammaticale"}); xGCButton.onclick = () => { this.switchMenu(); + let sText = (xNode.tagName == "TEXTAREA") ? xNode.value : xNode.innerText; oGrammalecte.startGCPanel(xNode); xGrammalectePort.postMessage({ sCommand: "parseAndSpellcheck", dParam: {sText: sText, sCountry: "FR", bDebug: false, bContext: false}, dInfo: {sTextAreaId: xNode.id}