JavaScript Text Editors for Markdown

Below is a list of JavasScript libraries that support markdown. Static content can be syntax highlighted using libraries with a much smaller footprint, but editing text with syntax highlighting takes significantly more code. I’ve attempted to make syntax highlighters into a simple editor, but quickly ran into issues with pre elements, cursor positioning, and cross-browser quirks of contenteditable.

Library Markdown support Size Editable
CodeMirror Yes 388kb Yes
CodeMirror - minified Yes 168kb Yes
Prism.js Yes 2kb No
Editorjs No 350kb Yes
highlightjs, Yes 34kb No
monaco-editor Yes 574kb Yes
Slate Yes 27.9kb Yes

For the initial stack for the Noteland web app, I need a library that is small and fast like prismjs, but with basic editing capabilities. There’s an opportunity for a focused markdown-only editor in the 10s of Kb range.