Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A client-side JavaScript library that converts HTML into Markdown, MIT licensed, designed for WYSIWYG editor integration.
reMarked.js is a client-side JavaScript library that converts HTML into Markdown, purpose-built for pairing with WYSIWYG editors that lack Markdown output.
reMarked.js is a client-side HTML-to-Markdown converter written in JavaScript and released under the MIT License. It takes a DOM element such as document.body as input and produces a Markdown string as output, entirely in the browser without server round-trips. The library was created by leeoniya and is positioned as a client-side equivalent to the server-side Markdownify project.
# suffixes), code block delimiters, list bullet style, horizontal rule character, indentation string, strong/emphasis characters, and more. You can switch h1_setext and h2_setext on or off to choose between underline headers and hash-mark headers.gfm_del toggles strikethrough for del tags, gfm_tbls enables Markdown-extra tables, and tbl_edges shows or hides side edges on tables. A col_pre option supplies the column prefix for missing table headers.unsup_tags option categorizes non-Markdown tags into ignore, inline, block, block2, block1c, and block2c behaviors, so script, style, iframe, canvas, and more are emitted the way you want, or not at all.tag_remap converts deprecated or variant tags to their modern equivalents, for example remapping i to em and b to strong.trim_code trims whitespace inside pre/code blocks, nbsp_spc converts entities to regular spaces, and br_only avoids using two trailing spaces as line break indicators.span_tags and div_tags options let you keep ambiguous span and div elements as HTML tags in the output.render(document.body)) to a portable Markdown draft.Include the reMarked.js script, create a new reMarked(options) instance with the configuration object of your choice, then call .render() on any DOM node to return a Markdown string. The options object is optional; sensible defaults cover common output styles, and the live demo at leeoniya.github.io/reMarked.js shows the converter in action.
reMarked.js is MIT Licensed, so it is free to use, modify, and distribute, including in commercial projects.
Markdownify is a server-side HTML-to-Markdown converter written in PHP that inspired reMarked.js to move the conversion to the client.
Yes, reMarked.js is released under the MIT License, which permits free use, modification, and redistribution with no license fee or attribution requirement beyond preserving the copyright notice.
reMarked.js takes a DOM element—typically document.body or the content container of a WYSIWYG editor—and renders that element's HTML into a Markdown string. The library runs entirely in the browser.
Yes. The gfm_del option enables strikethrough syntax for del tags, and gfm_tbls enables Markdown-extra table output. The tbl_edges option controls whether table side edges are rendered.
The README specifically names Redactor, TinyMCE, CKeditor, Loki, and CLeditor as integration targets. The library's design is to sit alongside those editors and produce Markdown from their HTML content.
Use the h1_setext and h2_setext options to underline H1 and H2 headings with setext syntax, or set them to false to force ATX hash-style headers. The h_atx_suf option adds a trailing # suffix to ATX headers.
