Documentation
CleanMermaid adds the Export-Safe Mermaid Diagram macro to Confluence Cloud.
1. Insert a Diagram
- Open any Confluence Cloud page in edit mode.
- Type
/mermaidand select Export-Safe Mermaid Diagram. - Pick a starter template (Flowchart, Sequence, Gantt, or ER Diagram) or paste your Mermaid syntax (
Tabindents;Ctrl/Cmd+Ssaves). - Choose Print-Neutral Light (recommended for PDF/Word) or Confluence Auto (Light/Dark).
- Click Save Diagram. CleanMermaid stores your Mermaid source alongside a bounded (≤ 140 KiB) PNG snapshot in macro config.
2. Export to PDF or Word (and Large-Page Limits)
When you export a page to PDF or Word, Confluence invokes the app's native
adfExport function, embedding the pre-rendered snapshot scaled to portrait page
width. For exceptionally dense diagrams (> 140 KiB PNG), the snapshot is omitted so
your Mermaid source still saves cleanly, and PDF/Word falls back to native/code rendering.
Note: Confluence Cloud pages with roughly 100 or more Forge macros may encounter platform
export rate limits (CONFCLOUD-82734).
3. Example Mermaid Snippet
flowchart LR
A[Author Diagram] --> B[2x PNG Snapshot]
B --> C[Confluence View]
B --> D[Crisp PDF & Word Export]