The Editor
Tables, Code, and Diagrams
Tables, Code, and Diagrams
Tables
The table button in the Insert group, or /table, drops in a 3 by 3 table with a header row.
Put the cursor in any cell and a table toolbar appears above the table. Every control is icon-only with a tooltip:
| Group | Controls |
|---|---|
| Rows | Add row before, Add row after, Delete row |
| Columns | Add column before, Add column after, Delete column |
| Cells | Merge cells, Split cell |
| Table | Toggle header row, Delete table |
Merge and split are disabled unless the current selection allows them. Drag the border between two columns to resize them. Tab moves to the next cell.
Code blocks
Insert with the code block button, /code, ⌘ ⌥ C, or by typing ``` at the start of a line: the block appears as the third backtick lands, with the cursor inside it. To give the fence a language as you type, press Backspace straight away to get the backticks back, then type the language and a space (```python). To leave a block, press Enter three times or the down arrow at its end; Backspace in an empty block turns it back into an ordinary line.
Each block has a copy button in its top corner, and while you edit, a language dropdown beside it. Choose from Plain text, JavaScript, TypeScript, Python, Bash, CSS, HTML, JSON, YAML, SQL, Go, Rust, Java, C, C++, Ruby, PHP, Swift, Kotlin, Markdown, Diff, Dockerfile, and GraphQL. Highlighting is applied live as you type.
export function greet(name: string): string {
return `Hello, ${name}`
}
Mermaid diagrams
/mermaid inserts a diagram seeded with a small flowchart. Select the block and click the edit button to open the code pane. ⌘ Enter saves, Escape cancels. The diagram re-renders on every save, and a syntax error is reported in place instead of blanking the block.
graph LR
A[Draft] --> B{Review}
B -->|Approved| C[Publish]
B -->|Changes| A
Anything Mermaid supports works: flowcharts, sequence diagrams, class diagrams, state diagrams, Gantt charts, pie charts.
Drawings
The editor has no drawing block of its own. To draw, make a Whiteboard page: boxes, connectors, freehand, and frames on a canvas of their own. See Whiteboard.
Earlier releases had an Excalidraw block. A drawing made with it is still on its page, as an ordinary image: you can resize, align, or replace it like any other image, but you cannot redraw it.
Draw.io is not available. A page that still holds a Draw.io block shows it as a line reading “Draw.io diagram (not supported)”, which you can select and delete like any other block.
Reading diagrams and images
On a published page, click a Mermaid diagram to open it at its own size, over the page. A large diagram scrolls inside the view, so nothing is shrunk to fit. Press Escape, click outside it, or use the close button to go back. Clicking an image opens it over the page too, fitted to your screen.
When a page holds images, diagrams, block equations, or embeds, the icon at the right of the title row (its tooltip says Compact images and diagrams) makes them compact, so a diagram sitting in a paragraph no longer pushes the text apart. Images, diagrams, and embeds take half the width they had; an image you gave a width to keeps it, and is halved on top of it. Embeds also get shorter, down to a minimum height. Block equations shrink a little, not by half, so they stay readable. Click the icon again for full size. The setting is yours and remembered on this device only; it changes nothing on the page for anyone else, and editing always shows everything at full size.
Math
Two math blocks, both rendered with KaTeX.
Math Equation (/math, ⌘ ⇧ M) is a centered block equation. Inline Math (⌘ ⇧ E) sits inside a sentence and flows with the text.
Click either one to open its LaTeX editor. It includes a palette of common symbols and a reference of frequently used patterns. Block equations get left, center, and right alignment buttons. Escape closes the editor; for inline math, Enter closes it too.
\frac{\partial u}{\partial t} = \alpha \nabla^{2} u