lexx.gr

Markdown Editor and Browser Spell Checking

Here is the problem. I needed a minimal and stable Markdown editor for my project LucentCMS. I was already using Codemirror for the code fields, so I though why not use the same library for markdown fields.

The good news is that Codemirror does have a Markdown mode, which is working pretty well in my opinion. The bad news is that is didn't seem to support the browser's native spellchecking.

I decided to start looking for other markdown editors but sadly I couldn't find even one with native spellchecking support, except StackEdit. But, StackEdit was an overkill for my scenario.

Anyway, after some searching I found this thread and it works great. You just have to set the following in your Codemirror config

{
 inputStyle: "contenteditable",
 spellcheck: true
}

Your only concern would be older browsers.

published at Sat, 14 Aug 2021 14:44

In Collections

Coding

Mostly stuff about web development

more from the blog


Hey, you are visiting an ancient web space. This website resides here since 2006. Explore this ancient space with love and peace.

If you want to send some spam or anything else, my email is [email protected]

Also you can follow me on twitter because I am amazing @lexx27

You can follow my blog updates using this RSS feed