Add feature to reposition mistakes functionality after text replacement

This commit is contained in:
Aljaž Grilc 2024-02-16 10:08:34 +01:00
parent f30ee9d5ca
commit 544a43b191

View File

@ -368,6 +368,10 @@ class BesEditor {
text.substring(match.offset + match.length)
el.textContent = newText
BesEditor.clearSingleMistake(editor, el, rect)
// In my opinion, this approach provides the most straightforward solution for repositioning mistakes after a change.
// It maintains reasonable performance as it only checks the block element that has been modified,
// rather than re-evaluating the entire document or a larger set of elements.
editor.proof(el)
}
// This function clears a single mistake