Diagrams
You can draw diagrams right inside a note — flowcharts, sequence diagrams, and more — by describing them in a simple text syntax. When you preview the note, your description turns into a clean, finished diagram, so you never have to fiddle with boxes and arrows by hand.
Writing a diagram
Add a cell labelled mermaid and describe the diagram inside it. Each line names a step and how it connects to the next. To drop one in quickly, right-click in the editor and choose Elements → Mermaid Diagram; you'll get an empty cell with your cursor ready inside.
```mermaid
flowchart LR
A[Draft] --> B{Reviewed?}
B -- yes --> C[Published]
B -- no --> A
```
Kinds of diagrams
Many diagram styles are supported — flowcharts, sequence diagrams, class and state diagrams, entity relationships, timelines, and more. Two of the most useful:
LR) or top-down (TD).
```mermaid
flowchart TD
Start --> Decision{OK?}
Decision -->|yes| End
Decision -->|no| Start
```
```mermaid
sequenceDiagram
Alice->>Bob: Question
Bob-->>Alice: Answer
```
Diagrams use the same colors as the note around them. Switch between light, dark, or high-contrast, and your diagrams redraw to match — there's nothing extra to set up.