Mermaid and YAML
Bring a README's Mermaid diagram onto the canvas, or edit YAML to change a document as text. Mermaid conversion supports a subset of the format and doesn't preserve every detail on a round-trip.
Applying Mermaid or YAML to a document requires docs:write.
Import Mermaid
- Select Import from Mermaid in the editor toolbar, or find it under Document in the insert palette (
Shift+N). - Paste the source, or select Upload a file. The picker accepts
.mmd,.mermaid,.mdand.txtfiles. - Select Convert. Read the generated YAML and any Imported with these limits notes.
- Check Replace the current canvas with this diagram, then select Apply to document.
Import replaces the current canvas. If the source contains several fenced Mermaid blocks, only the first is imported.
See Mermaid import and export for supported diagram types and the details conversion can lose.
Copy the canvas as Mermaid
Select Export as Mermaid in the toolbar or the insert palette (Shift+N). Use Copy for an individual diagram block, or Copy all as Markdown to copy all blocks with Mermaid fences.
A document can produce several blocks when it mixes diagram types. Read the export notes before treating the output as a copy of the whole canvas: some elements can't be represented as Mermaid.
Edit the document as YAML
- Select Edit document as YAML in the toolbar or the insert palette (
Shift+N). - Edit the source and resolve validation errors before selecting Apply.
- If the panel says Not code-backed yet, confirm that applying YAML will replace the canvas.
For a code-backed document, Apply recompiles the YAML in the panel. Manual placements that aren't pinned may move. The in-app editor guide covers the YAML panel and editing a selected element; the YAML reference lists the available node types.