Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify word's highlighting methods #51

Open
michaelkn opened this issue Jan 5, 2018 · 1 comment
Open

Unify word's highlighting methods #51

michaelkn opened this issue Jan 5, 2018 · 1 comment

Comments

@michaelkn
Copy link
Contributor

There are (at least) two places where the words' highlighting is used: Find and replace and Spell checker. Perhaps, the newly added findAndReplaceDOMText script could help in both places.

findAndReplaceDOMText(node, {
 find: 'something',
 wrap: 'span',
 wrapClass: 'hilitorHelper'
});
@d1vanov
Copy link
Owner

d1vanov commented Jan 6, 2018

Unification is always welcome, spell checker's code for misspelled words detection is quite messy currently as it tries hard to account for many possibilities - like for the parts of the misspelled word to be located in adjacent yet different DOM nodes. Given the demo page of findAndReplaceDOMText, it can handle all such tricky cases. Would be nice to try employing this script in spell checker as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants