@openmarkdown-dev/editor MIT

A Markdown editor that edits the text, not a tree.

npm i @openmarkdown-dev/editor

Demo Docs

Lossless round-trip: open and save without editing, and the file is byte-for-byte what it was. Learn more →
Edit tables in place, cell by cell. Learn more →
Drop in an image, then drag a corner to resize it. Learn more →
Mermaid diagrams and math render where you write them. Learn more →

Open, then save, side by side

EditorEditsOpen, then saveDiff lines
OpenMarkdown@openmarkdown-dev/editor f897917 (unpublished)the textByte-identical0
Atomic Editor@atomic-editor/editor 0.6.2the textByte-identical0
Milkdown Crepe@milkdown/crepe 7.22.3a tree13 of 22 changed, 2 lost30
Toast UI Editor@toast-ui/editor 3.2.2a tree15 of 22 changed, 8 lost40
Tiptap@tiptap/markdown 3.32.0a tree17 of 22 changed, 3 lost41
MDXEditor@mdxeditor/editor 4.3.3a treeRefused the file: a reference link stopped its parser—

Atomic Editor ties with us: it also edits the text. The test file uses valid but uncommon syntax on purpose.

How we tested →

Put it on a page

<div id="editor"></div>

<script type="module">
  import { createEditorState, mountEditor } from "https://esm.sh/@openmarkdown-dev/editor@0.2.1";

  const editor = mountEditor(
    document.getElementById("editor"),
    createEditorState({ doc: "# Hello\n\nStart typing.\n" }),
  );
  // editor.getDoc() returns the Markdown, byte for byte.
</script>

More examples

Using it? Add yourself to ADOPTERS.md