diff --git a/app/static/js/highlight.js b/app/static/js/highlight.js index 1003918..5c3d5f4 100644 --- a/app/static/js/highlight.js +++ b/app/static/js/highlight.js @@ -22,7 +22,7 @@ function getWord() { function highLight() { if (!isHighlight) return; - let articleContent = document.getElementById("article").innerText; + let articleContent = document.getElementById("text-content").innerText; let pickedWords = document.getElementById("selected-words"); // words picked to the text area let dictionaryWords = document.getElementById("selected-words2"); // words appearing in the user's new words list let allWords = pickedWords.value + " " + dictionaryWords.value; @@ -34,11 +34,11 @@ function highLight() { articleContent = articleContent.replace(new RegExp("\\s"+list[i]+"\\s", "g"), " " + list[i] + " "); } } - document.getElementById("article").innerHTML = articleContent; + document.getElementById("text-content").innerHTML = articleContent; } function cancelHighlighting() { - let articleContent = document.getElementById("article").innerText; + let articleContent = document.getElementById("text-content").innerText; let pickedWords = document.getElementById("selected-words"); const dictionaryWords = document.getElementById("selected-words2"); const list = pickedWords.value.split(" "); @@ -60,7 +60,7 @@ function cancelHighlighting() { } } } - document.getElementById("article").innerHTML = articleContent; + document.getElementById("text-content").innerHTML = articleContent; } function fillInWord() {