Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spell checker #521

Closed
jankatins opened this issue Mar 9, 2016 · 5 comments
Closed

Add spell checker #521

jankatins opened this issue Mar 9, 2016 · 5 comments

Comments

@jankatins
Copy link
Member

This project seems to implement a spell checker without the need to use a local server: https://github.com/NextStepWebs/codemirror-spell-checker

Their quickstart looks easy to integrate (though I have no clue how to hock that into the current codemirror startup in the notebook).

Seems to be en_US only for now: https://github.com/NextStepWebs/codemirror-spell-checker/blob/master/src/js/spell-checker.js#L15 :-(

@jankatins
Copy link
Member Author

There is also this here: codemirror/codemirror5#1017 (comment) and then https://github.com/codemirror/CodeMirror/blob/a196861f9a44db63f946bbe68119f8ab903f3bd5/doc/manual.html#L365

<dt id="option_inputStyle"><code><strong>inputStyle</strong>: string</code></dt>
      <dd>Selects the way CodeMirror handles input and focus. The core
      library defines the <code>"textarea"</code>
      and <code>"contenteditable"</code> input models. On mobile
      browsers, the default is <code>"contenteditable"</code>. On
      desktop browsers, the default is <code>"textarea"</code>.
      Support for IME and screen readers is better in
      the <code>"contenteditable"</code> model. The intention is to
      make it the default on modern desktop browsers in the
      future.</dd>

If I read that right, then there is a second codemirror way and that way has spell checking?

@juhasch
Copy link
Member

juhasch commented Mar 10, 2016

There is the Calysto one here: https://github.com/Calysto/notebook-extensions
Also, it looks like the language files used by NextStepWebs can be imported from other spell checkers, i.e. there are other languages available.

@jcb91
Copy link
Member

jcb91 commented Mar 10, 2016

I've started making something based loosely on the NextStepWebs one (which uses typo.js for the actual spell-checking, then, incidentally, defines a CodeMirror overlayMode in a very similar way to the Calysto one, which uses a json object as a wordlist for spell-checking). It has configurable urls for the dictionaries, so you can use others, they're hunspell-style dictionaries. There are some comments in various places that typo.js doesn't cope very well with accents though, I think...

@jcb91
Copy link
Member

jcb91 commented Mar 11, 2016

see #530

@juhasch
Copy link
Member

juhasch commented Jul 10, 2016

Obsolete, we now have a spellchecker extension.

@juhasch juhasch closed this as completed Jul 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants