docs/help/contents/rich-text-editor/headings-and-collapsible-sections.md
Headings give a note its structure. Notesnook supports six levels, each one available from the toolbar, from a keyboard shortcut, or by typing # characters. Every heading also acts as a fold: click the chevron beside it and everything underneath collapses out of the way.
{{headings}} dropdown in the toolbar — it shows the current block, either {{paragraph}} or Heading 1 to Heading 6.Or skip the toolbar entirely:
| Block | Shortcut |
|---|---|
| Heading 1 | Ctrl+Alt+1 |
| Heading 2 | Ctrl+Alt+2 |
| Heading 3 | Ctrl+Alt+3 |
| Heading 4 | Ctrl+Alt+4 |
| Heading 5 | Ctrl+Alt+5 |
| Heading 6 | Ctrl+Alt+6 |
| Back to a paragraph | Ctrl+Alt+0 |
On macOS use Command+Option in place of Ctrl+Alt.
Applying a heading keeps the line's alignment and text direction, and clears any custom font size on the selection so the heading uses its own size.
::: info Headings are unavailable inside a code block
The {{headings}} dropdown is disabled while the cursor is inside a code block, where # is an ordinary character.
:::
With Markdown shortcuts turned on, type one to six # characters followed by a space at the start of a line and it becomes a heading of that level — # for Heading 1, ###### for Heading 6. Markdown shortcuts need the Essential plan or higher, and on desktop and web they're switched off until you turn them on in {{settings}} > {{customization}} > {{editor}}.
The toolbar dropdown and the keyboard shortcuts work on every plan.
Every heading with text in it has a chevron at the end of the line.
A collapsed heading hides everything after it until the next heading of the same or a higher level. So collapsing a Heading 2 folds away the paragraphs, lists and any Heading 3 blocks that belong to it, and stops at the next Heading 2 or Heading 1.
These block types are hidden when a section is collapsed:
Nested folds are remembered: if a Heading 3 was already collapsed inside a section, expanding the parent heading leaves that inner section folded.
::: info The fold is stored in the note Collapsing a section is a change to the note's content, so the fold state is saved and syncs to your other devices. It doesn't delete or move anything — expanding the heading brings everything back exactly as it was.
:::
Pressing Enter at the end of a collapsed heading's text doesn't push a new line into the hidden content. Notesnook adds a new paragraph after the whole collapsed section and puts the cursor there, so you can carry on writing beneath a folded chapter without unfolding it first.
Pressing Enter anywhere else in the heading behaves normally.
Headings are what the table of contents is built from.
Click the table-of-contents button in the editor's top bar. The pane opens beside the note, lists every heading as a tree, follows along as you scroll, and jumps to a heading when you click it. A note with no headings shows {{noHeadingsFound}}.
Find & replace also expands collapsed headings automatically when a match is hidden inside one.
# headings