Native spellcheck (nativeSpellcheck) doesn't work, has unnatural custom style, doesn't allow adding corrections to dictionary
Leaving the options empty or adding spellChecker: false and nativeSpellchecker: true should
- make spelling mistakes appear as they would in any ol' normal textarea
- allow right clicking to add corrections to the browser spellchecker dictionary
EasyMDE doesn't. Unless this 2020 comment is still valid.
To Reproduce
Below is the code based on and tested at https://stackblitz.com/edit/easymde :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>EasyMDE demo</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/easymde/dist/easymde.min.css"
/>
<script src="https://cdn.jsdelivr.net/npm/easymde/dist/easymde.min.js"></script>
</head>
<body>
<textarea id="my-text-area">
A spellink mistake.
Blueb erry wh ine.
Astount ing..</textarea>
<script>
const easymde = new EasyMDE({
// START INSERTING
// END INSERTING
element: document.getElementById('my-text-area'),
sideBySideFullscreen: false
});
</script>
</body>
</html>
Paste the above into https://stackblitz.com/edit/easymde and add a space to the text area to trigger the spell check.
Then add
spellChecker: false,
nativeSpellchecker: true,
to the INSERTING commented area and trigger spellcheck again.
Expected behavior
- I can add terms to the native spellchecker dictionary
- The default, familiar browser style marking of spelling mistakes is used
Both are visible in this ckeditor5 issue
Also here's a screenshot of both visible while writing this ticket:
vvvvvvvvvvvvvvvvSCREENSHOTvvvvvvvvvvvvvvvv
^^^^^^^^^^^^^SCREENSHOT^^^^^^^^^^^^^
Actual behavior
- Adding terms to dictionary via context menu when right clicking on typos is not being offered
- Nonstandard style to mark typos is used (pink background)
vvvvvvvvvvvvvvvvSCREENSHOTvvvvvvvvvvvvvvvv
^^^^^^^^^^^^^SCREENSHOT^^^^^^^^^^^^^
Version information
- Current CDN version
- Windows Chrome and Firefox
I'm not sure if I didn't properly test this or whether the results are inconsistent. After seeing https://github.com/Ionaru/easy-markdown-editor/issues/586 I tried my example again. Adding
spellChecker: false,
nativeSpellchecker: true,
disables spellcheck completely.
If these are the default values, that doesn't seem to make sense. Adding inputStyle: 'textarea', doesn't fix it.
For me it started working with
spellChecker: false,
nativeSpellchecker: true,
inputStyle: contenteditable,
Thank you @valentijnscholten (contenteditable has to be in quotes)
spellChecker: false,
nativeSpellchecker: true,
inputStyle: 'contenteditable',