294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
|
let n = 0;
for (let sSugg of dErr["aSuggestions"]) {
if (n > 0) {
xNodeSuggLine.appendChild(document.createTextNode(" "));
}
let xNodeSugg = document.createElement("span");
xNodeSugg.setAttribute("class", "sugg");
xNodeSugg.textContent = sSugg;
xNodeSugg.addEventListener("click", function (e) {
xEditor.changeParagraph(iParagraph, xNodeSugg.textContent, dErr["nStart"], dErr["nEnd"]);
xNodeDiv.textContent = "";
that.reparseParagraph(xEditor, iParagraph);
});
xNodeSuggLine.appendChild(xNodeSugg);
n += 1;
}
xNodeDiv.appendChild(xNodeSuggLine);
|
|
|
|
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
|
let n = 0;
for (let sSugg of dErr["aSuggestions"]) {
if (n > 0) {
xNodeSuggLine.appendChild(document.createTextNode(" "));
}
let xNodeSugg = document.createElement("span");
xNodeSugg.setAttribute("class", "sugg");
xNodeSugg.textContent = sSugg.replace(" ", " "); // use nnbsp
xNodeSugg.addEventListener("click", function (e) {
xEditor.changeParagraph(iParagraph, sSugg, dErr["nStart"], dErr["nEnd"]);
xNodeDiv.textContent = "";
that.reparseParagraph(xEditor, iParagraph);
});
xNodeSuggLine.appendChild(xNodeSugg);
n += 1;
}
xNodeDiv.appendChild(xNodeSuggLine);
|