Write naturally. Keep Markdown.
Edit rich text, import Markdown, and export it again. Review the conversion details for your content.
Details
Give writers a rich, formatting-first editing surface while your storage stays Markdown. Import Markdown into the editor, export the content back to Markdown, or convert either direction on the server — all built in, no extra library.
Rich editing, Markdown storage.
# and * textarea.toMarkdown() gives you clean Markdown to store or diff in version control.Production example
See RichTextEditor in RichMarkdown
A live writing app built with RichTextEditor: visual editing, inline code, fenced code blocks, and Markdown import and export.
Try local notes, research clips, Markdown downloads and Word export. RichMarkdown is free to use.
Import Markdown into the editor
fromMarkdown() parses Markdown to HTML and loads it into the editing surface, so a document stored as Markdown opens as fully-formatted rich text.
var editor1 = new RichTextEditor("#div_editor1");
// Markdown in — converts to HTML and loads it into the editor.
editor1.fromMarkdown("# Release notes\n\n- Fixed **login**\n- Added _dark mode_");Export the content back to Markdown
toMarkdown()serializes whatever is currently in the editor — including nested lists and tables — back to Markdown, ready to save.
// Markdown out — serialize the current content back to Markdown. var md = editor1.toMarkdown(); // "# Release notes\n\n- Fixed **login**\n- Added _dark mode_"
Convert without changing the editor
Need the HTML for a Markdown string but do not want to replace what the user is editing? Pass { apply: false } and fromMarkdown() returns the HTML instead of loading it.
// Convert Markdown to HTML WITHOUT replacing the editor content.
var html = editor1.fromMarkdown(mdString, { apply: false });Convert on the server, no DOM required
The package’s serverentry exposes the same Markdown conversion for Node — useful in an API route, a build step, or a static-render pipeline.
// Convert on the server — no browser, no DOM.
import { fromMarkdown, toMarkdown } from "@richscripts/richtexteditor/server";
const html = fromMarkdown("## Heading\n\nSome **content**.");
const markdown = toMarkdown(structuredDocument);Only need to turn a Google Docs, Word or web page into a .md file once, without adding an editor to your app? RichMarkdown, a free browser tool from the same team, converts pasted rich text to clean Markdown. Nothing is uploaded and no sign-up is needed.
More than Markdown
- Clean HTML too: the same content is available as publish-ready HTML and a structured JSON document, not only Markdown.
- AI and collaboration included: AI Toolkit (bring your own key), per-node Yjs CRDT collaboration, tracked changes, and comments are part of the license.
- Perpetual license from $129: no subscription and no per-seat AI pricing — see pricing.