Aa 0.14.1

Callouts and toggles

A callout sets some words apart in a box, as Notion draws one: an icon at the start of its first line, a fill in one of Notion’s colours, and what it holds inside the box. Folded, it shows only its first line.

Callouts

Enter starts a new line of the body. Press the icon for another, and ⌘/ for the fills.

What it stores

Choose Callout in the slash menu, or type > [!💡] and a space at the start of a block. The words on its first line are its title; Enter starts a line of its body under it, inside the box. Press the icon’s square to choose another icon, or no icon; press ⌘/ for the block’s commands and choose a fill. Press ⌘Enter with the caret in it to fold it.

The box has a square of padding and Design system 1’s corners, on a fill that is Notion’s grey unless a colour is written. Its icon stands on the first square inside, the words from the next square; without an icon the words start on the first. The fills are Design system 1’s pastels: grey, brown, orange, yellow, green, blue, purple, pink and red, and white, the paper in a hairline frame. A product changes one with --aa-callout-fill-<colour>.

What you seeHow you write itWhat it stores
A calloutCallout in the slash menu, or > [!💡] and a space> [!💡] Title, then > The body on each line under it
A callout in a colourA fill in the block’s commands (⌘/)> [!💡 yellow] Title
A callout with a pictureA picture’s address in the brackets> [!https://example.com/icon.png] Title
A callout with no iconNo icon in the icon’s choice> [!] Title
A folded callout⌘Enter> [!💡]- Title
A Markdown alert> [!note] and a space> [!note] Title
A toggleToggle in the slash menu> [!note]- Title
A toggle headingToggle heading 1, 2 or 3 in the slash menu> [!note]- ## Title

The brackets hold the callout’s icon, an emoji or a picture’s https:// address, and its colour, one of gray, brown, orange, yellow, green, blue, purple, pink, red and white, in either order, either of them or neither. Without a colour the fill is grey; gray chosen from the commands is written, so a product reading the Markdown knows it was chosen. This is what Link writes for a Notion page’s callouts, so a callout goes to Notion and back with its icon and colour.

Markdown alerts

A type word alone: a hairline and the type's icon. Press the icon, or ⌘Enter, to fold one.

What it stores

A word in letters alone in the brackets is a Markdown alert, as GitHub and Obsidian write them: the type’s icon on the first square, the words on the next and a hairline at the start, no box. Given an icon or a colour, an alert becomes a callout and its type word goes.

TypeIcon
[!tip]A tick
[!warning], [!caution]A box with a dot
[!note], and any otherA box with lines
Any type, foldedA triangle

Every line of a callout starts with >, so a Markdown reader that does not know callouts shows it as a quote.

A folded callout

Press the icon, or put the caret in the title and press ⌘Enter, to open it.

What it stores

A folded callout shows its title and hides its body. The body is kept as it was: folding and opening write or take away the one minus sign and nothing else. With the caret in a folded callout’s body, the body is shown while it is edited. ⌘⌥T opens every folded callout in the editor. An alert folds from its icon too.

A toggle is a folded alert made from the slash menu, the same Markdown.

A toggle heading

Press the icon to open it. ⌘⌥T opens every toggle in the editor.

What it stores

A toggle heading is a callout whose title is a heading, folded to begin with: #, ## or ### and a space after the type make the title one. The title is set in the headings’ medium face, and it folds and opens as any callout does.

KeysWhat they do
EnterA new line of the body
⌘EnterFolds the callout the caret is in, or opens it
⌘⌥TOpens every folded callout and toggle in the editor

From code, editor.toggle() folds or opens the callout the caret is in, or ticks the box it is in, and editor.toggle(true) opens a callout. editor.callout({ icon, color }) gives the callout the caret is in (or the one at an index) another icon or colour, null taking the icon away or putting the grey back; readCallout, writeCallout and setCallout do the same on the Markdown. See Methods and events.