uiwjs / react-codemirror

CodeMirror 6 component for React. @codemirror https://uiwjs.github.io/react-codemirror/
https://uiwjs.github.io/react-codemirror/
MIT License
1.65k stars 132 forks source link

Code editor is checking spelling even spellCheck is false #342

Open Tula-Magar opened 2 years ago

Tula-Magar commented 2 years ago

I don't know why but the spellCheck isn't working

`

     <CodeMirror
        value={value}  
        spellCheck="false"
        options={{
          spellCheck:"false",
        }}
      extensions={[
        markdown({ base: markdownLanguage, codeLanguages: languages }),
      ]}      
    />`
jaywcjlove commented 2 years ago

@Tula-Magar What version are you using? Can you provide an example using https://codesandbox.io/?

Tula-Magar commented 2 years ago

@jaywcjlove I was out on the weekend. I am currently using the following:

Package.json

"@uiw/react-codemirror": "^4.9.2",
"@codemirror/lang-markdown": "^6.0.0",
"@codemirror/language-data": "^6.1.0",

I tried writing example code in the codesandbox.io but the code sandbox doesn't show any error. However, the same code shows a red underline in the const on the browser editor such as chrome and firebox. Here is the link: https://codesandbox.io/s/code-mirror-spellcheck-q1d21y?file=/src/App.js

Tula-Magar commented 2 years ago

Figured out why the spell was checking. Grammarly extension on browser was checking the spelling so, I turn off the Grammarly from the browser and I no longer get a spelling error in the code. Is there a way to disable a Grammarly or browser extension in react? If I find the solution to turn off the spelling checking then I will post it for future reference.

jaywcjlove commented 2 years ago

https://discuss.codemirror.net/t/os-level-spellcheck-is-disabled-on-ios-even-after-adding-contentattribute/4128

I didn't find a good solution, but codemirror seems to disable spell checking. @Tula-Magar