241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
-
-
+
+
|
function _createError (sUnderlined, oErr) {
let xNodeErr = document.createElement("u");
xNodeErr.id = "err" + oErr['sErrorId'];
xNodeErr.textContent = sUnderlined;
xNodeErr.dataset.error_id = oErr['sErrorId'];
xNodeErr.dataset.ignored_key = oErr['sIgnoredKey'];
xNodeErr.dataset.error_type = (oErr['sType'] === "WORD") ? "spelling" : "grammar";
xNodeErr.setAttribute("href", "#");
xNodeErr.setAttribute("onclick", "return false;");
/*xNodeErr.setAttribute("href", "#");
xNodeErr.setAttribute("onclick", "return false;");*/
if (xNodeErr.dataset.error_type === "grammar") {
xNodeErr.dataset.gc_message = oErr['sMessage'];
xNodeErr.dataset.gc_url = oErr['URL'];
if (xNodeErr.dataset.gc_message.includes(" #")) {
xNodeErr.dataset.line_id = oErr['sLineId'];
xNodeErr.dataset.rule_id = oErr['sRuleId'];
}
|
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
|
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
|
-
-
+
+
|
}
}
function _createSuggestion (sErrId, iSugg, sSugg) {
let xNodeSugg = document.createElement("a");
xNodeSugg.id = "sugg" + sErrId + "-" + iSugg.toString();
xNodeSugg.className = "sugg";
xNodeSugg.setAttribute("href", "#");
xNodeSugg.setAttribute("onclick", "return false;");
/*xNodeSugg.setAttribute("href", "#");
xNodeSugg.setAttribute("onclick", "return false;");*/
xNodeSugg.dataset.error_id = sErrId;
xNodeSugg.textContent = sSugg;
return xNodeSugg;
}
/*function switchEdition (sEditButtonId) { // edit
let xParagraph = document.getElementById("paragr" + sEditButtonId.slice(4));
|