createMermaidDiagram
Parse mermaid text and create tldraw shapes for supported diagram types. Returns the SVG string for supported diagrams, or null when the diagram type is unsupported (after calling onUnsupportedDiagram if provided). Throws MermaidDiagramError if parsing fails.
function createMermaidDiagram(
editor: Editor,
text: string,
options?: MermaidDiagramOptions,
): Promise<void>;Parameters
| Name | Description |
|---|---|
| |
| |
|
Returns
Promise<void>;Prev
useViewportHeightNext
defaultCreateMermaidNodeFromBlueprint