User interface enhancements and beta features for http://ckeditor-spellcheck.nanospell.com . This repo is for nanospell developers and trusted partners to modify and fork plugin.js
Other
0
stars
0
forks
source link
Minimize DOM manipulations by not clearing spellcheck spans #7
Currently, each spellcheck cycle clears all the spellchecking spans under the element being marked. For large typo-heavy blocks, this is super inefficient.
Suppose you have a paragraph with 100 typos in it. Each time spellcheck is called on that block (for example, for each new word), all 100 spans are removed and their text nodes put back into the paragraph. Then the paragraph is scanned for any new words. AJAX call is made if required, then all typos are once again wrapped in spans.
Some ideas:
the word scanning should ignore words that are already in spellcheck spans
the word marking should not re-mark words that are already in spellcheck spans
Currently, each spellcheck cycle clears all the spellchecking spans under the element being marked. For large typo-heavy blocks, this is super inefficient.
Suppose you have a paragraph with 100 typos in it. Each time spellcheck is called on that block (for example, for each new word), all 100 spans are removed and their text nodes put back into the paragraph. Then the paragraph is scanned for any new words. AJAX call is made if required, then all typos are once again wrapped in spans.
Some ideas: