Mermaid to Excalidraw
Turn Mermaid diagram definitions into editable Excalidraw elements.
@excalidraw/mermaid-to-excalidraw converts a Mermaid diagram definition into Excalidraw elements: shapes, arrows and text you can keep editing, not a picture of the diagram. It's what excalidraw.com uses when you insert a Mermaid diagram or paste a Mermaid definition onto the canvas. The source is on GitHub.
flowchart LR
subgraph TOP
direction TB
subgraph B1
direction RL
i1 -->f1
end
subgraph B2
direction BT
i2 -->f2
end
end
A --> TOP --> B
B1 --> B2
Since v3, diagrams are parsed and laid out by Pele, which reads Mermaid syntax and lays diagrams out without rendering them into the page. Flowcharts (including swimlane-beta), sequence, class, ER and state diagrams become Excalidraw elements. Any other diagram type Pele supports is inserted as an image.
Try it in the playground.
Last updated on