Dead-simple spell checking in CodeMirror.
npm install codemirror-spell-checkerVia npm.
```
npm install codemirror-spell-checker --save
Via bower.
``
bower install codemirror-spell-checker --save
Via jsDelivr. Please note, jsDelivr may take a few days to update to the latest release.
`HTML`
and the backdrop mode to your desired mode. Be sure to load/require overlay.min.js if you haven't already.`JS
CodeMirrorSpellChecker({
codeMirrorInstance: CodeMirror,
});CodeMirror.fromTextArea(document.getElementById("textarea"), {
mode: "spell-checker",
backdrop: "gfm" // Your desired mode
});
`That's it!
Customizing
You can customize the misspelled word appearance by updating the CSS. All misspelled words will have the .cm-spell-error class.`CSS
.CodeMirror .cm-spell-error{
/ Your styling here /
}
``