JSFiddle - React, Tailwind, and code Playground
HTML
<input id="refreshSpellCheck" type="button" value="Refresh Spellcheck" />
<div contenteditable="false" id="container"></div>
CSS
div {
border:1px solid;
}
JavaScript
var container = $('#container');
var paragraphText = 'Bob was wondering down the lane. Bob was wondering down the lane. Bob was wondering down the lane. Bob was wondeing down the lane. Bob was wondering down the lane. Bob was wondering down the lane. Bob was wondering down the lane. Bob was wondering down the lane. Bob was wondering down the lane. Bob was wondering down the lane.'
for (i = 0; i <= 100; i++) {
var divElement = $("<div>" + paragraphText + "</div>")
.attr("contenteditable", "true")
.attr("spellcheck", "true")
.addClass("editors");
container.append(divElement);
}
$('#refreshSpellCheck')
.click(function () {
var editors = $('.editors');
editors.each(function (index, element) {
console.log(index);
element.focus();
Speckie.EnableSpellCheck(element, true);
});
console.log("Finished");
});