Skip to main content

Block Reference

This page documents every block type the editor ships. Every block has a JSON shape, a renderer, and a programmatic insert path via editor.blocks.insert.

All blocks share the same envelope when serialised: id, type, data, and an optional tunes record.

The block shape

Every block serialises to the same JSON envelope. The id is assigned by the editor and can be omitted when constructing data programmatically.

JSON
{
  "id": "abc123",
  "type": "paragraph",
  "data": { "html": "Hello <b>world</b>" },
  "tunes": {}
}

alert

Highlighted call-out box with 4 variants.

FieldTypeRequiredDescription
htmlstringYesHTML content of the alert message. Inline tool markup is supported.
variant'error' | 'info' | 'success' | 'warning'YesVisual style of the alert. One of: error, info, success, warning.
JSON
{
  "type": "alert",
  "data": { "html": "Your session will expire in 5 minutes.", "variant": "warning" }
}

audio

Audio block. Consumed via the audioUploader callback on Editor.create.

FieldTypeRequiredDescription
urlstringYesURL of the audio file to embed.
captionstringNoPlain-text caption displayed below the player.
altstringNoAccessible label for the audio element.
alignment'center' | 'left' | 'right'NoHorizontal alignment of the player. One of: center, left, right.
JSON
{
  "type": "audio",
  "data": { "url": "/media/podcast.mp3", "caption": "Episode 12", "alignment": "center" }
}

checklist

Interactive checkbox list with per-item checked state.

FieldTypeRequiredDescription
itemsChecklistItem[]YesArray of checklist items, each with a text and checked state.
items[].textstringYesHTML content of the item label.
items[].checkedbooleanYesWhether the checkbox is checked.
JSON
{
  "type": "checklist",
  "data": {
    "items": [
      { "text": "Install the package", "checked": true },
      { "text": "Mount the editor", "checked": false }
    ]
  }
}

code

Syntax-highlighted code block. 50 languages are supported, including typescript, python, rust, go, ruby, swift and kotlin.

FieldTypeRequiredDescription
codestringYesThe raw code string to display.
languageCodeLanguageNoSyntax highlighting language. Defaults to typescript.
themeCodeThemeNoEditor colour theme. Defaults to github-dark.
showCopybooleanNoShow a copy button in the rendered output.
syncKeystringNoBlocks sharing a key switch language together.
variantsCodeVariant[]NoWhen non-empty, renders a tab strip of variants and is the authoritative source.
JSON
{
  "type": "code",
  "data": { "code": "const x = 42;", "language": "typescript", "theme": "github-dark", "showCopy": true }
}

collapsible

A collapsible section with a title and nested child blocks. Unknown child block types are preserved verbatim, so newer documents survive older renderers.

FieldTypeRequiredDescription
htmlstringYesSection title as inline HTML.
openbooleanNoWhether the section renders expanded.
childrenBlock[]NoNested child blocks.
JSON
{
  "type": "collapsible",
  "data": {
    "html": "Details",
    "open": true,
    "children": [{ "type": "paragraph", "data": { "html": "Hidden until opened." } }]
  }
}

collection

Embeds a live collection view by id. The block stores only the collection identity; the server owns the shape and the data.

FieldTypeRequiredDescription
collectionIdstringYesThe embedded collection id. The only thing stored.
JSON
{
  "type": "collection",
  "data": { "collectionId": "c-42" }
}

columns

A multi-column layout of 2 to 4 columns, each holding its own list of child blocks.

FieldTypeRequiredDescription
columnsBlock[][]YesThe columns, each a list of child blocks. Two to four columns.
JSON
{
  "type": "columns",
  "data": {
    "columns": [
      [{ "type": "paragraph", "data": { "html": "Left" } }],
      [{ "type": "paragraph", "data": { "html": "Right" } }]
    ]
  }
}

date

A calendar date, stored timezone-free so every collaborator agrees on it.

FieldTypeRequiredDescription
datestringYesISO date in yyyy-MM-dd form, timezone-free.
JSON
{
  "type": "date",
  "data": { "date": "2026-08-31" }
}

delimiter

Visual separator between sections.

FieldTypeRequiredDescription
variant'line' | 'stars'YesVisual style of the divider. One of: line, stars.
JSON
{
  "type": "delimiter",
  "data": { "variant": "line" }
}

doc_card

A rich link card for another document. It stores the referenced page id plus a display snapshot that hosts refresh on rename.

FieldTypeRequiredDescription
pageIdstringYesThe referenced page id; the card identity.
titlestringYesDisplay snapshot of the page title.
iconstringNoOptional icon shown on the card.
descriptionstringNoOptional description shown under the title.
JSON
{
  "type": "doc_card",
  "data": { "pageId": "p-7", "title": "Release notes", "icon": "📄" }
}

embed

An embedded link. The block stores the URL; the provider and embed markup are derived at render time, with unfurl fields as the fallback card.

FieldTypeRequiredDescription
urlstringYesThe embedded link. Provider and embed markup are derived from it at render time.
titlestringNoUnfurl snapshot for the link card.
descriptionstringNoUnfurl description for the link card.
imageUrlstringNoUnfurl preview image for the link card.
JSON
{
  "type": "embed",
  "data": { "url": "https://www.youtube.com/watch?v=abc123" }
}

file

A file attachment with a download link, a name, and optional size and content type.

FieldTypeRequiredDescription
urlstringYesWhere the file is served from.
namestringYesFile name shown on the attachment.
sizenumberNoFile size in bytes.
contentTypestringNoMIME type of the file.
JSON
{
  "type": "file",
  "data": { "url": "/files/notes.pdf", "name": "notes.pdf", "size": 2048, "contentType": "application/pdf" }
}

glance

A label and value summary panel: rows of facts read at a glance, with an optional caption and background variant.

FieldTypeRequiredDescription
rowsGlanceRow[]YesThe facts to show: each row is a label and an inline HTML value.
captionstringNoOptional caption above the rows.
variant'plain' | 'error' | 'info' | 'success' | 'warning'NoBackground variant; plain is unstyled, the rest match the alert palette.
JSON
{
  "type": "glance",
  "data": {
    "caption": "Facts",
    "rows": [{ "label": "Version", "html": "<b>1.0</b>" }],
    "variant": "plain"
  }
}

Top-level and section headings (h1 to h6). Inline tools work inside the html payload.

FieldTypeRequiredDescription
htmlstringYesHTML content of the heading. Inline tool markup is supported.
level'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'NoHeading level. One of: h1, h2, h3, h4, h5, h6. Defaults to h1.
JSON
{
  "type": "header",
  "data": { "html": "Getting started", "level": "h2" }
}

image

Image block with caption and alt text. Consumed via the imageUploader callback on Editor.create.

FieldTypeRequiredDescription
urlstringYesURL of the image to embed.
captionstringNoPlain-text caption displayed below the image.
altstringNoAlt text for the image element.
alignment'center' | 'left' | 'right'NoHorizontal alignment of the image. One of: center, left, right.
JSON
{
  "type": "image",
  "data": { "url": "/img/hero.jpg", "caption": "Hero image", "alt": "A hero", "alignment": "center" }
}

latex

LaTeX math, stored as source and typeset at render time. A better renderer later improves every document that already exists.

FieldTypeRequiredDescription
sourcestringYesThe LaTeX source. Stored as source, never as rendered output.
JSON
{
  "type": "latex",
  "data": { "source": "\\frac{a}{b}" }
}

list

Ordered or unordered list. Each item is html.

FieldTypeRequiredDescription
type'ordered' | 'unordered'YesList type. One of: ordered, unordered.
itemsstring[]YesArray of HTML strings, one per list item.
JSON
{
  "type": "list",
  "data": { "type": "unordered", "items": ["First item", "Second item"] }
}

mermaid

A Mermaid diagram, stored as source and drawn at display time, never as a raster.

FieldTypeRequiredDescription
sourcestringYesThe Mermaid source. Stored as source, never as drawn output.
JSON
{
  "type": "mermaid",
  "data": { "source": "flowchart TD\n  A --> B" }
}

openapi

Renders an interactive API reference from an OpenAPI 3.x document, inline or fetched from a URL, with server pickers and code snippets.

FieldTypeRequiredDescription
specobjectNoAn inline OpenAPI 3.x document. Wins over url when both are set.
urlstringNoWhere to fetch the OpenAPI document from at render time.
includeOpenApiFilterNoFilter for which operations to render.
excludeOpenApiFilterNoFilter for which operations to hide.
defaultServerstringNoWhich server the reference selects by default.
snippetLanguagesCodeLanguage[]NoLanguages offered for request snippets.
JSON
{
  "type": "openapi",
  "data": { "url": "/api/openapi.json", "defaultServer": "https://api.example.com" }
}

paragraph

Rich-text paragraph. Accepts inline tool markup such as bold, italic, code, link, marker, and tooltip.

FieldTypeRequiredDescription
htmlstringYesHTML content of the paragraph. Inline tool markup is supported.
JSON
{
  "type": "paragraph",
  "data": { "html": "This is a <b>paragraph</b> with inline markup." }
}

quote

Blockquote with an optional author attribution.

FieldTypeRequiredDescription
htmlstringYesHTML content of the quote body. Inline tool markup is supported.
authorstringNoPlain-text or HTML attribution shown beneath the quote.
JSON
{
  "type": "quote",
  "data": { "html": "The best way to predict the future is to invent it.", "author": "Alan Kay" }
}

sketch

A freehand drawing stored as strokes, never a raster, so it stays editable and scales cleanly.

FieldTypeRequiredDescription
strokesSketchStroke[]YesThe drawing as strokes: each stroke is a list of points with optional color and width.
JSON
{
  "type": "sketch",
  "data": { "strokes": [{ "points": [0, 0, 10, 10], "color": "#ff0000", "width": 3 }] }
}

table

Data grid. First row can be used as a header; each cell is html.

FieldTypeRequiredDescription
datastring[][]YesTwo-dimensional array of HTML cell strings. The first row is the header row.
captionstringNoPlain-text or HTML caption displayed below the table.
showDownloadbooleanNoShow a download button in the rendered output.
JSON
{
  "type": "table",
  "data": {
    "data": [["Name", "Type"], ["html", "string"], ["variant", "AlertVariant"]],
    "caption": "AlertData fields",
    "showDownload": false
  }
}

toc

A table of contents derived from the document headers at render time. It stores no data of its own.

This block stores no fields; the list is derived from the document headers at render time.

JSON
{
  "type": "toc",
  "data": {}
}

updates

A live activity feed for a document. It stores identity, never a snapshot, so it keeps showing current activity.

FieldTypeRequiredDescription
pageIdstringNoWhich document activity to show. Absent means the document the block sits in.
JSON
{
  "type": "updates",
  "data": { "pageId": "p-7" }
}

video

Video block. Consumed via the videoUploader callback on Editor.create.

FieldTypeRequiredDescription
urlstringYesURL of the video file or YouTube/Vimeo embed link.
captionstringNoPlain-text caption displayed below the player.
altstringNoAccessible label for the video element.
alignment'center' | 'left' | 'right'NoHorizontal alignment of the player. One of: center, left, right.
JSON
{
  "type": "video",
  "data": { "url": "/media/demo.mp4", "caption": "Product demo", "alignment": "center" }
}