Skip to content
Limited Time 40% off for early adopters — Get discount →

Markdown Integration

Last updated:

Mermaid Studio provides complete language support for Mermaid diagrams embedded in Markdown files. This is especially useful for README files, documentation, and wikis.

To add a Mermaid diagram to a Markdown file, use a fenced code block with the mermaid or mmd language identifier:

markdown-preview

Mermaid Studio recognizes these blocks and provides full editor support.

When editing a Markdown file containing Mermaid diagrams, diagrams can be previewed live in the Markdown preview panel.

Hovering over a Mermaid diagram in the preview panel reveals the following controls:

  • Copy Diagram Code — Copy the Mermaid code to the clipboard
  • Show Source/Diagram — Toggle between viewing the highlighted Mermaid code and the rendered diagram
  • Pop-out Diagram — Open the diagram in a separate window for easier viewing

markdown-preview-controls

Clicking the Show Source/Diagram button toggles between the rendered diagram and the Mermaid source code with syntax highlighting.

The source view includes limited syntax highlighting. Some advanced semantic highlighting features may not be available in the preview panel.

markdown-source-diagram-toggle

Clicking the Pop-out Diagram button opens the rendered diagram in a separate window with full zoom and pan controls.

markdown-popout

You can configure how diagrams appear in the Markdown preview, including inline display mode and maximum size constraints. See Markdown configuration for details.

Previewing Mermaid diagrams in requires enabling the Mermaid Studio (Chromium browser) Markdown preview renderer.

After installing Mermaid Studio, open Markdown files will display a banner prompting you to enable the Mermaid Studio Preview renderer.

markdown-banner

Click Use Mermaid Studio Preview to activate the panel. Once enabled, Mermaid diagrams in the Markdown file will render live in the preview panel.

Alternatively, you can enable the Mermaid Studio preview panel via the markdown settings menu: Languages & Frameworks > Markdown

Select Mermaid Studio (Chromium browser) from the dropdown Preview rendering engine dropdown.

markdown-settings