Created
May 15, 2020 10:51
-
-
Save bjoerntx/1c62cad06bd7cf2a79f26f08ec29f067 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function checkText() { | |
// call the check method | |
var results = await TXSpell.check(document.getElementById('textbox').textContent); | |
// check console for details | |
console.log(results); | |
var consoleText = ""; | |
// loop through the results and return the text | |
results.forEach(function (element) { | |
consoleText += "<p>Misspelled: <strong>" + element.text + "</strong></p>"; | |
}); | |
document.getElementById('results').innerHTML = consoleText; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment