monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

Spell checking using browser spell checker

Open AndersMad opened this issue 4 years ago • 11 comments

If the DIVs and SPANs is explicitly set to contenteditable="true" (instead of inherited) you get a red squiggly under badly spelled words in the monaco editor. The context menu hides the suggestions - but if that is removed/disabled - the word can be replaced; but even without the replace - the spell lint would be very nice.

Such a "feature" would be VERY nice for .TXT, .MD etc... especially with Chromes "new" enhanced (opt. in) spell checker that also "checks the language".

AndersMad avatar May 23 '20 09:05 AndersMad

Hi @AndersMad - do you have a patch for this or know what the implications are for editing, cursor movement, and text replacement? I'm very interested in having native spell-checking enabled while still using Monaco…

dmsnell avatar Jul 06 '20 22:07 dmsnell

Hi @dmsnell, no - I quickly concluded that this would take some inner workings for vscode and I "only" needed it for some MD editing.. But please do upvote it here - I'd think/guess that it would be fairly easy to achieve for a core developer.

AndersMad avatar Jul 06 '20 22:07 AndersMad

Thanks for the quick response. I was curious because I assumed the opposite - that it might involve some major overhauls 😄

It was surprising to me to find that it's not possible. I hope there is something we're all missing.

dmsnell avatar Jul 06 '20 22:07 dmsnell

My strategy is to do the spell checking via a language server. I have to admit that it is a bit clumsy. I also have to implement the add to dictionary function. It would be great if monaco could leverage built-in spell checkers in browsers.

elliott-wen avatar Jul 07 '20 22:07 elliott-wen

@elliott-wen I am facing the same issue of trying to implement spell checking to a monaco in a browser. Mind sharing how you ended up solving that?

omerdun avatar Jan 31 '21 20:01 omerdun

Really wishing spell checking was available. 👍🏻 hope this feature lands soon.

mrinterweb avatar Sep 02 '22 18:09 mrinterweb

I suport this suggestion, Not having access to a spellcheck when writing the readme.md is a bad experience.

Jirido avatar May 29 '23 16:05 Jirido

+1 on adding spell checking using built-in browser spell checking. Being able to use LanguageTool or Grammarly when editing markdown or plain text would really make Monaco a lot more useful.

abn0mad avatar Jun 24 '23 04:06 abn0mad

Does it have a plan to implement spell-checking in Monaco? I see codemirror supports the Grammarly web extension

tc1989tc avatar Jan 12 '24 03:01 tc1989tc

I second the spelling check feature as it would be really helpful for those who use monaco for writing natural languages like documents and comments.

And I agree with @AndersMad that making Monaco compatible with Grammarly is not that hard for core developer. Editors like codemirror naturally support grammarly.

batchor avatar Jan 20 '24 00:01 batchor

@alexdima @hediet Any plan on the spelling check? This would be really beneficial.

batchor avatar Mar 05 '24 10:03 batchor