Export
Export documents to PDF, Markdown, HTML, RTF, plain text and JSON.
Toolbar button
| Option | Type | Default | Description |
|---|---|---|---|
formats | ExportFormat[] | all | Formats shown in the dropdown, in order. |
filename | string | () => string | 'document' | File name without extension. |
Formats
| Format | How it works |
|---|---|
pdf | Opens the browser print dialog with a clean, styled copy of the document — choose Save as PDF. No extra dependencies. |
markdown | editor.getMarkdown() — requires the Markdown extension. |
html | A standalone HTML file that embeds the editor's content styles. |
text | Plain text with blank lines between blocks. |
rtf | Rich Text Format (headings, bold/italic/underline/strike, sub/superscript, lists, task lists, quotes, code, tables). Opens in Word, Pages and LibreOffice. |
json | The Tiptap/ProseMirror JSON document — lossless. |
Programmatic export
Word (.docx)
DOCX export needs a heavier converter, so it's not built in. The examples app contains a complete ExportWord plugin built with prosemirror-docx that you can copy.