-
Notifications
You must be signed in to change notification settings - Fork 52
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
Spell check doesn't work on load #28
Comments
Due to the way CodeMirror works, you must begin typing to trigger the spell checker. |
the issue is that you load the dictionaries asynchronously in definemode which results in the first iteration triggered by CM happening before they finished loading. I reworked your code to wait for the dicts to load see - https://plnkr.co/edit/O412xuNyBMbUqX6U5qUH?p=preview |
If that's the case, I'd be open to a PR that fixes the bug. |
I ended up with a better solution, there is no need to create an overlay mode, instead I use addOverlay and issue it only after the dictionaries loaded. This greatly simplifies the code and gets the initial text checked (no need for overlay.js) see plunkr Basically this is a complete rewrite so not sure if a PR is the right thing to do, but you can get the code from there. |
when loading an initial text into CM with cm.setValue(), how can I run the spellchecker on it ?
thx!
The text was updated successfully, but these errors were encountered: