Skip to content

Plugin options

markdown-it-mermaid-enhanced keeps the public option surface intentionally small

MermaidItOptions

FieldTypeDefaultNotes
theme'auto' | 'default' | 'dark' | 'forest' | 'neutral' | 'base''auto'auto follows system dark mode
renderEngine'mermaidjs' | 'excalidraw''mermaidjs'Selects the renderer behind the wrapper
sketchbooleanfalseEnables Mermaid sketch mode
fontFamilystring''Standard font family override
sketchFontstring''Sketch font family override and implicit sketch enable
minHeightstring''Plugin-level minimum height fallback
mermaidConfigRecord<string, unknown>{}Extra Mermaid config merged into Mermaid.js rendering
excalidrawConfigMermaidToExcalidrawConfig{}Supported conversion config for Excalidraw mode

MermaidToExcalidrawConfig

FieldTypeNotes
startOnLoadbooleanForwarded to the conversion layer
flowchart.curve'linear' | 'basis'Flowchart edge curve
themeVariables.fontSizestringFont size used during conversion
maxEdgesnumberLimits edge count
maxTextSizenumberLimits text payload size

A compact example

ts
import MarkdownIt from 'markdown-it'
import markdownItMermaidEnhanced from 'markdown-it-mermaid-enhanced'

const markdown = new MarkdownIt().use(markdownItMermaidEnhanced, {
  theme: 'auto',
  renderEngine: 'mermaidjs',
  sketch: true,
  sketchFont: '"Excalifont"',
  minHeight: '160px',
})