All-in-one Mermaid enhancement plugin for Obsidian. Combines auto-fit, interactive lightbox, export capabilities, and context menu actions in a single plugin.
Mermaid diagrams are automatically scaled to fit the container width using SVG viewBox manipulation — diagrams stay crisp at every zoom level.
Click any diagram to open it in a large modal overlay:
- Mouse wheel zoom (centered on cursor position)
- Drag to pan
- Minimap appears when zoomed in, showing your current viewport
- Keyboard shortcuts:
+/-zoom, arrow keys pan,Rreset,Escapeclose - Touch support: pinch-to-zoom and single-finger pan
- Zoom indicator shows current zoom percentage
- Theme-aware background (adapts to dark/light mode)
Right-click any diagram for export options:
- Copy as PNG (transparent or white background)
- Copy as SVG (clean markup with inline styles)
- Copy as PDF (clipboard on macOS, file download on other platforms)
- Copy Mermaid source (raw diagram code)
A small toolbar appears when hovering over a diagram with quick-access buttons for:
- Open in lightbox
- Export options
- Theme toggle — cycle between default, light, and dark background to improve readability of diagrams that don't match your current Obsidian theme
Drag any diagram directly into other applications as a PNG image.
Configure Obsidian's built-in Mermaid.js engine directly from the plugin settings:
- ELK Layout Engine — Enable the ELK layout engine for dramatically improved layouts of complex diagrams. Use
flowchart-elkor addconfig: layout: elkto your diagrams. - Max Edges Override — Increase the default 500-edge limit for large architecture diagrams.
- Global Theme — Set a default Mermaid theme (default, dark, forest, neutral, base) for all diagrams. Individual diagrams can still override with
%%{init: {'theme': '...'}}%%directives. - Version Detection — Displays the Mermaid.js version bundled with your Obsidian installation.
- Configurable PNG export resolution (1x, 2x, 3x, 4x)
- Mobile support with always-visible toolbar
- Works in both Reading View and Live Preview
- Per-feature toggle in settings
- No external network requests
- SVG sanitization for security (strips scripts and event handlers)
- Open Obsidian Settings
- Go to Community Plugins and disable Restricted Mode
- Click Browse and search for "Mermaid Maestro"
- Install and enable the plugin
- Download
main.js,elk-layout.js,manifest.json, andstyles.cssfrom the latest release - Create a folder
mermaid-maestroin your vault's.obsidian/plugins/directory - Copy the downloaded files into that folder
- Restart Obsidian and enable the plugin in Settings → Community Plugins
| Setting | Default | Description |
|---|---|---|
| Auto-Fit | On | Automatically scale diagrams to container width |
| Lightbox | On | Click to open diagrams in large overlay |
| Context Menu | On | Right-click export menu |
| Hover Toolbar | On | Show toolbar on diagram hover |
| PNG Export Scale | 2x | Resolution multiplier for PNG export |
| ELK Layout Engine | Off | Enable ELK for improved complex diagram layouts |
| Max Edges | 500 | Maximum edges allowed per diagram |
| Default Theme | default | Global Mermaid theme for all diagrams |
# Install dependencies
npm install
# Development build (watches for changes)
npm run dev
# Production build
npm run build


