214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
|
freeParagraph (xParagraph) {
xParagraph.contentEditable = "true";
let nStart = parseInt(xParagraph.dataset.caret_position_start);
let nEnd = parseInt(xParagraph.dataset.caret_position_end);
oGrammalecte.setCaretPosition(xParagraph, nStart, nEnd);
this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).textContent = "A";
this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.backgroundColor = "hsl(120, 30%, 50%)";
this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.animation = "";
setTimeout(() => { this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.boxShadow = ""; }, 1000);
}
applySuggestion (sNodeSuggId) { // sugg
try {
let sErrorId = this.xParent.getElementById(sNodeSuggId).dataset.error_id;
//let sParaNum = sErrorId.slice(0, sErrorId.indexOf("-"));
let xNodeErr = this.xParent.getElementById("grammalecte_err" + sErrorId);
|
|
|
|
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
|
freeParagraph (xParagraph) {
xParagraph.contentEditable = "true";
let nStart = parseInt(xParagraph.dataset.caret_position_start);
let nEnd = parseInt(xParagraph.dataset.caret_position_end);
oGrammalecte.setCaretPosition(xParagraph, nStart, nEnd);
this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).textContent = "A";
this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.backgroundColor = "";
this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.animation = "";
setTimeout(() => { this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.boxShadow = ""; }, 500);
}
applySuggestion (sNodeSuggId) { // sugg
try {
let sErrorId = this.xParent.getElementById(sNodeSuggId).dataset.error_id;
//let sParaNum = sErrorId.slice(0, sErrorId.indexOf("-"));
let xNodeErr = this.xParent.getElementById("grammalecte_err" + sErrorId);
|