Tour of the blocks

One short story, written with every block Nabu ships. Hover any part of it to see what it is and how to make one.

  • 14 blocks
  • 3 text behaviours
  • 4 paste handlers
  • 1 transform
1.
The river

The last ferry

The ferryman waited under the eaves, an unlit lantern in his hand. Nobody had crossed since noon.
The river keeps no appointments, only debts.
Are you crossing?
If you are rowing.
  • the rope
  • the oar

JavaScript
const lantern = { lit: false };
The quay at dusk: a lantern on its post, a boat on the river
Dusk fell on the quay.

Every block, one by one

THE BLOCKS

Every block, as a specimen

The ferryman waited under the eaves.

paragraph

Plain text: the block Nabu makes for a line.

  • /text

The last ferry

heading

A title, levels 1 to 6.

  • # … ######
  • /h1
  • /h2
  • /h3
The river keeps no appointments.

blockquote

A line someone else said.

  • > ␣
  • /quote
JavaScript
const lantern = { lit: false };

code

Verbatim text, with a language.

  • ```js ↵
  • ```js ␣
  • /code

callout

A note set apart, with an icon and a tint.

  • ! ␣
  • /callout
What the ferryman knew
The ford is upstream.

toggle

A title that opens on what it hides.

  • /toggle
  • the rope
  • the oar

list · list-item

Bullets, numbers and to-dos, nested.

  • - ␣
  • 1. ␣
  • [ ] ␣
  • /bullet
  • /numbered
  • /todo
Are you crossing?
If you are rowing.

dialogue

Lines of speech, one speaker each.

  • -- ␣ at line start
1.
The river
Nobody had crossed since noon.

region

A chapter with a title, inside one continuous text.

  • ::: ␣
  • /section-1
  • /section-2
  • /section-3
  • Mod-Enter

divider

The scene changes.

  • --- ␣
  • /divider
The quay at dusk

image

A picture, stored outside the document.

  • /image
  • paste
  • drop

Click a card to see its state, live. Chips: what you type · the slash menu · the markdown. Every key and edge case: Blocks reference

NOT BLOCKS, BUT EVERYWHERE

What happens as you type

Rich text

rich-text
Before:Mod-B on “ferryman”
After:
ferryman

Bold, italic, underline, code, strike, links, with their shortcuts.

Markdown shortcuts

markdown-shortcuts
Before:**ferry**
After:
ferry

Inline markdown turns into marks as you type.

Typography

typography
Before:noon -- dusk
After:
noon — dusk

Two hyphens and a space become a dash.

What happens when you paste

Nabu paste

nabu-paste
Before:copy from a Nabu editor
After:

The last ferry

Between two Nabu editors, nothing is lost.

HTML paste

html-paste
Before:<h2>Dusk</h2><ul><li>the rope</li><li>the oar</li></ul>
After:

Dusk

  • the rope
  • the oar

From web pages and applications.

Markdown paste

markdown-paste
Before:> [!NOTE] > It rises.
After:

Markdown text becomes blocks.

Plain text paste

plain-text-paste
Before:line one line two
After:
line one
line two

The last resort: one line, one block.

Turn into

block

Turns the block holding the caret into another type, and keeps its text, its marks and its id. Slash entries and toolbar buttons are made of it. So can you: nabu.exec('block:transform', { type, props })

Make your own block

A block is one extension. The extensions guide walks you through one.