Skip to content

Markdown

Markdown import/export is exposed through the toolbar menu and Core commands.

EntryBehavior
Toolbar Markdown menuImport from a selected .md file or export the current content
ctx.importMarkdown(md)Import Markdown content directly
ctx.getMarkdown()Export the current content as Markdown

toolbarOptions.markdown controls file picker accept rules and export filename:

ts
const toolbarOptions: ToolbarOptions = {
  markdown: {
    importAccept: '.md,.markdown,text/markdown,text/plain',
    exportFilename: () => `doc-${Date.now()}.md`,
  },
}

Markdown is a lossy format. Some HTML styling and layout features, such as font family, font size, line height, indent, table column widths, and custom attachment card metadata, may not round-trip perfectly. Use HTML or JSON output when you need complete fidelity.

Dedicated Mermaid blocks round-trip as standard mermaid fenced code blocks. Source is preserved, while the code/diagram/split editor view is not represented by Markdown and defaults to split after import.

A community package built on Tiptap v3 + Vue 3.