> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cleve.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Blocks

> Callouts, toggles, lists, tables, math, code, Mermaid diagrams, images, and embeds

Everything in a doc's body is a block: a paragraph, a heading, a list, a table, an image. Add any block from the `/` slash menu or the toolbar's **Insert** menu, or with a typing shortcut. See [Writing and formatting](https://docs.cleve.ai/features/writing.md) for the full list of shortcuts.

For live HTML widgets, see [Interactive blocks](https://docs.cleve.ai/features/interactive-blocks.md).

## Text and headings

Plain text is a paragraph. Headings structure your doc and feed the outline that appears on the right of the page.

* Type `#`, `##`, `###`, or `####` and a space for Heading 1 to 4, or use the **Heading** menu in the toolbar.
* Pick **Paragraph** in the **Heading** menu, or **Text** in the slash menu, to turn a heading back into text.
* The doc's first line is always its title.

## Lists and to-do lists

| List | Shortcut |
| - | - |
| Bulleted list | `- ` or `⌘⇧8` / `Ctrl+Shift+8` |
| Numbered list | `1. ` or `⌘⇧7` / `Ctrl+Shift+7` |
| To-do list | `[] ` or `⌘⇧9` / `Ctrl+Shift+9` |

Press `Tab` to nest an item and `⇧Tab` / `Shift+Tab` to move it back out. Click a to-do item's checkbox to tick it off.

### Assign a to-do

To assign a to-do item to someone, type `@` inside the item and pick them under **Assign to**. You can tag more than one person. Who you can tag is explained in [Mention people](https://docs.cleve.ai/features/links.md#mention-people).

## Toggles

A toggle is a block you can open and close, useful for hiding detail until someone needs it.

* Type `> ` at the start of a line, or choose **Toggle** from the slash menu.
* Click the arrow to open or close it. Whether it's open or closed is saved with the doc.
* To move a line out of a toggle, press `⇧Tab` / `Shift+Tab`. To turn the toggle back into normal text, press `Backspace` at the start of its title.

### Toggle headings

A toggle heading is a heading that collapses everything under it. Choose **Toggle heading 1**, **2**, or **3** from the slash menu, or type `# > `, `## > `, or `### > `.

Toggle headings appear in the doc outline. Headings hidden inside a closed toggle don't.

## Callouts

A callout is a coloured box with an icon, for notes and warnings the reader shouldn't miss. There are five types: **Note**, **Tip**, **Important**, **Warning**, and **Caution**.

* Choose **Callout** from the slash menu to add a **Note** callout.
* Or type `[!note]`, `[!tip]`, `[!important]`, `[!warning]`, or `[!caution]` and a space at the start of a line.
* To change the type, click the callout's icon and pick another.

Callouts can hold any blocks, including lists and images.

## Quotes

Type `"` and a space, choose **Quote** from the slash menu or **Insert** menu, or press `⌘⇧B` / `Ctrl+Shift+B`.

## Divider

Type `---` or choose **Divider** from the slash menu to add a horizontal line. Dividers also split a doc into slides when you [present it](https://docs.cleve.ai/features/writing.md#present-a-doc).

## Tables

Choose **Table** from the slash menu or **Insert** menu to add a 3 × 3 table with a header row.

When your cursor is in a table, a **Table options** button appears. It lets you:

| Option | What it does |
| - | - |
| **Add column before** / **Add column after** | Insert a column next to the current one |
| **Delete column** | Remove the current column |
| **Add row above** / **Add row below** | Insert a row next to the current one |
| **Delete row** | Remove the current row |
| **Toggle header row** | Turn the first row's header styling on or off |
| **Merge/split cells** | Merge the selected cells, or split a merged cell |
| **Delete table** | Remove the whole table |

Drag a column's edge to resize it. Press `Tab` to move to the next cell.

Tables pasted from Markdown, spreadsheets, or web pages come in as tables.

## Math

Cleve renders equations written in LaTeX.

* **Block equation:** choose **Math equation** from the slash menu. It sits on its own line, centred.
* **Inline equation:** choose **Inline equation** from the **Insert** menu, or type `$$` around a formula, like `$$E = mc^2$$`. If you select text first, it becomes the formula.

Click an equation to edit it. Type the formula in the **Formula (LaTeX)** box, then press `Enter` or click **Save**. Press `Esc` or click **Cancel** to leave it unchanged.

## Code blocks

Type ` ``` ` and a space, choose **Code block** from the slash menu or **Insert** menu, or press `⌘⌥C` / `Ctrl+Alt+C`.

* **Language:** pick one from the menu at the top of the block to get syntax highlighting. Options include **Plain text**, JavaScript, TypeScript, TSX, JSX, Python, Bash, JSON, HTML, CSS, SQL, Markdown, YAML, Go, and Rust, plus **Mermaid** for diagrams. You can also set it as you type, for example ` ```python `.
* **Copy code** copies the code to your clipboard.
* **Download code** saves it as a file.

## Mermaid diagrams

Mermaid turns short text descriptions into flowcharts, sequence diagrams, timelines, Gantt charts, and more.

Choose **Mermaid diagram** from the slash menu or **Insert** menu. Cleve adds a small example flowchart for you to edit. You can also set any code block's language to **Mermaid**.

A Mermaid block has two views:

* **Preview** shows the rendered diagram. Use **Download diagram** to save it as **Download SVG** or **Download PNG**.
* **Code** shows the Mermaid source, which you edit like any code block.

If the diagram can't be drawn, you'll see *"Couldn't render this diagram. Open Code to check the syntax."*

### Work on a diagram full screen

In **Preview**, click **View fullscreen** to open the diagram in a full-screen view.

* Drag to move around, and use the zoom controls or pinch to zoom.
* Click **Code** to open the **Mermaid source** beside the diagram. Edits update the diagram and the doc as you type, and `⌘Z` / `Ctrl+Z` and `⌘⇧Z` / `Ctrl+Shift+Z` undo and redo them.
* Describe a change in the box at the bottom, such as *"add a step for legal review"*, and Cleve updates the diagram for you. This works like editing an [interactive block with Cleve](https://docs.cleve.ai/features/interactive-blocks.md#edit-with-cleve) and uses your [usage](https://docs.cleve.ai/pricing/usage.md).
* Click **Exit fullscreen** or press `Esc` to go back to the doc.

You can also ask Cleve in chat to create or change diagrams in a doc.

## Images

Add images in any of these ways:

* Choose **Image** from the slash menu or **Insert** menu, then click to upload or drag files onto the upload box. You can add up to 3 images at a time.
* Drag image files straight into the doc.
* Paste an image from your clipboard.

Images can be PNG, JPEG, GIF, or WebP, up to 5 MB each.

Click an image and drag its handles to resize it. Its proportions stay the same.

Right-click an image for more options:

| Option | What it does |
| - | - |
| **Copy image** | Copy the image to your clipboard |
| **Crop image** | Crop the image in place |
| **Download image** | Save the image to your device |
| **Replace image** | Swap in a different image file |
| **Reset image** | Undo a crop and go back to the original |
| **Extract text** | Read the text in the image, then **Insert** it into the doc or **Copy** it |
| **Align left** / **Align center** / **Align right** | Position the image on the page |
| **Delete image** | Remove the image |

To create images with AI, see [Image generation](https://docs.cleve.ai/features/image-generation.md).

## YouTube videos

Paste a YouTube link on its own and Cleve embeds the video, with playback controls, in the doc.

Other embeds aren't supported as their own block type. To show something interactive, such as a chart or a calculator, use an [interactive block](https://docs.cleve.ai/features/interactive-blocks.md).

## Related

> **[Writing and formatting](https://docs.cleve.ai/features/writing.md)**
>
> The toolbar, slash menu, and Markdown shortcuts.

> **[Interactive blocks](https://docs.cleve.ai/features/interactive-blocks.md)**
>
> Live widgets and visuals, built and edited with Cleve.

> **[Links, backlinks and Brain](https://docs.cleve.ai/features/links.md)**
>
> Link docs and folders, and mention people.

> **[Import and export](https://docs.cleve.ai/features/import-export.md)**
>
> Export docs with their tables, diagrams, and images.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.