Spellchecker and context menu

Dear community,

First of all, many thanks to CodeMirror developers – that is a great project.

I have the following observations:

  • Would be nice if there is a spellchecker available (I saw that there are some chances for that to be implemented). Is it in general possible?
  • On some reason the context menu does not work for me on Firefox 43. I would like to change the font size, but when I right click, the default Firefox menu is shown. Who has the positive experience?

You can build a spell checker on top of CodeMirror, but I am not aware of any existing modules that you can just drop in.

I’m not sure what kind of context menu you expected, but getting the browser’s built-in context menu is the intended behavior. CodeMirror does not come with a change-font-size feature.

Thanks for the information related to spellchecker. I know that spellchecker works (buggy and incomplete) out-of-the box for editable div’s (see HTML spellcheck in contenteditable div).

Concerning the context menu, I have missed the point when looking at this screenshot: the user has to click on “Settings” icon, thus this is not context menu. Now I got it.

see my soloution here https://gist.github.com/kofifus/4b2f79cadc871a29439d919692099406

That looks very promising! Thanks for sharing the code. I’ve got few notes:

In FF v42 the demo is causing errors:

SyntaxError: let is a reserved identifier
let sbox = getSuggestionBox(typo);

SyntaxError: missing ; before statement
let typoLoaded=loadTypo(aff, dic);

After I have replaced “let” with “var” it started to work in FF, even though I was not able to make context menu shown.

What confuses me is a check in line 26:

if (!/[a-z]/i.test(word)) return null; // no letters

Are non-latin languages supported?

I also wonder if local dictionaries (e.g. located on C: drive) are supported (from what I see, only in Chrome)?

(Correct) Let support started with firefox 44.

Hi dma_k, let’s not have this discussion here … post in the gist :slight_smile: