Trabajando en este código durante 2 días, pero solo encuentra errores.
function one(){ var dictionary = 'https://rawcdn.githack.com/maheshmurag/bjspell/master/dictionary.js/en_US.js'; var lang = document.getLastRow(dictionary, function() { check.disabled = false; }); check.addEventListener('click', function() { var text = div.innerText; var words = text.split(/\s/); div.innerHTML = words.map(function(word) { var correct = lang.check(word); var className = correct ? 'correct' : 'misspelled'; var title = correct ? 'Correct spelling' : `Did you mean ${lang.suggest(word, 5).join(', ')}?`; return `<span title="${title}" class="${className}">${word}</span>`; }).join(' '); }); reset.addEventListener('click', function() { div.innerText = div.innerText; }); }Trabajando en este código para hacer el corrector ortográfico en la hoja de Google pero enfrentando errores. ¿Alguien puede ayudarme en estos?
& Script actualizado es que puede verificarlo en Google Sheet App Script y hacerlo ejecutable para verificar errores ortográficos y hacer una hoja sin errores ortográficos:
function one(){ var dictionary = 'https://rawcdn.githack.com/maheshmurag/bjspell/master/dictionary.js/en_US.js'; var document = Logger.log(dictionary, function() { check.disabled = false; }); check.addEventListener('click', function() { var text = div.innerText; var words = text.split(/\s/); div.innerHTML = words.map(function(word) { var correct = document.check(word); var className = correct ? 'correct' : 'misspelled'; var title = correct ? 'Correct spelling' : `Did you mean ${lang.suggest(word, 5).join(', ')}?`; return `<span title="${title}" class="${className}">${word}</span>`; }).join(' '); }); reset.addEventListener('click', function() { div.innerText = div.innerText; }); }