microsoft / monaco-editor

A browser based code editor
https://microsoft.github.io/monaco-editor/
MIT License
39.19k stars 3.51k forks source link

Spell checking using browser spell checker #1977

Open AndersMad opened 4 years ago

AndersMad commented 4 years ago

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".

dmsnell commented 4 years ago

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…

AndersMad commented 4 years ago

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.

dmsnell commented 4 years ago

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.

elliott-wen commented 4 years ago

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.

omerdun commented 3 years ago

@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?

mrinterweb commented 1 year ago

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

Jirido commented 1 year ago

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

abn0mad commented 1 year ago

+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.

tc1989tc commented 6 months ago

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

batchor commented 6 months ago

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 commented 4 months ago

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