PolicyStat / ckeditor-spell-check-plugin-js-dev-edge

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

Closed caffodian closed 8 years ago

caffodian commented 8 years ago

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:

caffodian commented 8 years ago

Fixed in #16 , though perhaps with some side effects. (#29)