Render-only · core bundle

Without the editor. Just the core.

The page loads only writer-core.min.js (~100 kB gzip). No contenteditable, no shadow DOM — just Markdown → IR → formats.

core only HTML · IR · JSON text · Markdown asPDF()

Live lab

Write on the left. Choose a format on the right.

Every tab is the same document in another format. Change the theme and watch typography flow into the preview — from the same toCss() that you will serve.

input.md
—
There is no PDF engine on this page. Press the button to see the real error.
Why core-only? In server-rendered pages, emails or static generators you do not need an editor — only rendering. The core bundle drops the editor and UI layer but keeps the parser, IR, plugins, typography, tables and renderers.

Formats

Six outputs, one structure.

All formats are produced from the same IR. There is no “HTML renderer” and “PDF renderer” disagreeing about the content.

FormatMethodNote
HTMLasHTML()Sanitized by default.
IRasIR()Canonical document node.
JSONasJSON({}, true)Pretty-printed IR.
MarkdownasMarkdown()Normalized source.
TextasText()Without markup.
PDFasPDF()Requires an engine — otherwise NO_PDF_ENGINE.

asPDF() returns RenderResult with base64 contents. The rest are strings / IR.

render-only.html
<script src="/assets/writer/writer-core.min.js"></script>
<div id="out"></div>

<script>
  const html = Writer.WriterRender('# Hello **world**')
    .theme('serif-editorial')
    .asHTML();

  document.querySelector('#out').innerHTML = html;
</script>

Core API

The same engine, without the UI.

writer-core.min.js exposes everything on window.Writer: createWriter, WriterRender, parse, stringify, providers, themes.

IR-first

Start with Writer.createWriter({ markdown }) and use toIR(), toHTML() or toText(). The document is always available.

writer-ir.v1

Typography without the editor

writer.typography.toCss(scope) gives you --wr-* variables. This page's preview applies them scoped.

5 themes

Smaller bundle

≈100 kB gzip instead of ≈130 kB. No shadow DOM, no contenteditable, no editor state — ideal for SSR and static pages.

core only
Want the editor too? Change one script tag to writer.min.js and add <writer-editor>. The core API stays the same. See the Editor API.

Rendering is only the beginning.

See the editor, media manager and commands — or read the full API.