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.38k stars 314 forks source link

Allowing multi language support for spell check #78

Open TristanPouliquen opened 5 years ago

TristanPouliquen commented 5 years ago

Is your feature request related to a problem? Please describe. I find quite limitating the idea that the spellCheck (coming from CodeMirror SpellChecker ) should only be on the American English dictionary.

Describe the solution you'd like How hard would it be to fork, take into account the changes from the actually open (and sadly stale) PR https://github.com/sparksuite/codemirror-spell-checker/pull/39 adding multi-language support and depend on this library rather than the official spellChecker (which appears as stale as SimpleMDE) ?

An addition would be to, perhaps, make a map between locales and the dictionaries from titoBozout's repository so that we could simplify the spellChecker attribute to:

EDIT

I went on and forked SpellChecker to start what I had in mind ! :smiley: : https://github.com/TristanPouliquen/codemirror-spell-checker

Akirami commented 5 years ago

How hard would it be to fork

I did it, check my repo for more information.

smundro commented 3 years ago

Does #333 (specifying a custom CodeMirrorSpellChecker instance cover this use case?

Ionaru commented 3 years ago

@TristanPouliquen

I think #333 will solve your issue, you can use it in the config like this:

const editor = new EasyMDE({
    spellChecker: (editor) => CodeMirrorSpellChecker({codeMirrorInstance: editor}),
});

Where CodeMirrorSpellChecker is your custom spellchecker from https://github.com/TristanPouliquen/codemirror-spell-checker.

The custom spellchecker functionality is currently available on the easymde@next branch and will be released after a few days if it satisfies the use-cases.

thecocce commented 1 year ago

Hi, any news about this feature release? I need to use with a italian language/dict

Ionaru commented 1 year ago

333 was merged and released a while ago. That should allow you to change the spell checker for different languages.

BLurRPC commented 5 months ago

Hi, do you have a working example ? I always have "CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option codeMirrorInstance" error.