adrienjoly / comment-editor-for-trello

Advanced Comments by AJ: turn Trello into a Notebook. (Power-up for Trello)
https://adrienjoly.com/comment-editor-for-trello/
9 stars 6 forks source link

Allow to disable spell and grammar checking, or to use the right language #4

Open adrienjoly opened 5 years ago

adrienjoly commented 5 years ago

This would prevent distracting red blocks everywhere when editing a comment in French language, without having to disable the browser's grammar checking (I just checked: disabling Chrome's grammar checking does not remove the red blocks):

image

This could be caused by a en-us language specification in any of the components being used on that page. (EDIT: I found none, from Chrome's inspector)

adrienjoly commented 5 years ago

Finding: The red blocks have the cm-spell-error CSS class, which seems to be added by https://github.com/sparksuite/codemirror-spell-checker

adrienjoly commented 5 years ago

Indeed, SimpleMDE (editor integrated into this power-up) = CodeMirror + codemirror-spell-checker, cf https://github.com/sparksuite/simplemde-markdown-editor

The spell checker could be disabled by adding the spellChecker: false prop (cf https://github.com/sparksuite/simplemde-markdown-editor#configuration) when instantiating new SimpleMDE in https://github.com/adrienjoly/comment-editor-for-trello/blob/a71a3c968199fec618eed18bd29215199ef3312f/js/comment-editor.js#L111

Or it could be disabled dynamically by altering the styling of the cm-spell-error CSS class.