Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.45k stars 319 forks source link

Add ability to pass `spellcheck` and `inputType` options to CodeMirror #22

Closed Cherry closed 4 years ago

Cherry commented 6 years ago

I'm submitting a...

After adding

inputStyle: "contenteditable",
spellcheck: true

to the CodeMirror initialisation at https://github.com/Ionaru/easy-markdown-editor/blob/master/src/js/easymde.js#L1584, I was able to get spellchecking within the browser (at least Google Chrome) functional without any apparent issues. If we could pass these options (or arbitrary options that just had defaults) to the CodeMirror initialisation, that would be awesome.

PS. Thanks so much for this fork of simplemde. It powers our internal CMS and our staff love using it.

Cherry commented 5 years ago

Any update on this? The built-in spellChecker is very limited and has many outstanding issues.

Being able to pass these options and enable the spellchecker built into the browser would be great, and would also help solve #78.

Elmervc commented 5 years ago

It would be nice if one can provide additional CodeMirror options to EasyMDE (but use with caution).

I also prefer to use the browser's spell check facility, so for now I manually added the OP mentioned options to the CodeMirror initialisation. It seems to work correctly (tested on Chrome and FireFox) The cursor jumps to line start when using formatting buttons.

A-312 commented 4 years ago

@Ionaru this one is fixed by #143