Blocks

Blocks can only contain either other block nodes, or inlines and text nodes. Blocks either wrap other blocks, or contain actual content.

Text Blocks

Paragraphs

{
"object": "block",
"type": "paragraph",
"nodes": [
{
"object": "text",
...
}
]
}

Headings

Headings are represents by text block with type being heading-1, heading-2 or heading-3.

{
"object": "block",
"type": "heading-1",
"nodes": [
{
"object": "text",
...
}
]
}

Block Containers

Blockquote

{
"object": "block",
"type": "blockquote",
"nodes": [
{
"object": "block",
"type": "paragraph",
"nodes": [
...
]
}
]
}

Hint

{
"object": "block",
"type": "hint",
"data": {
"style": "info"
},
"nodes": [
{
"object": "block",
"type": "paragraph",
"nodes": [
...
]
}
]
}

Tabs

{
"object": "block",
"type": "tabs",
"nodes": [
{
"object": "block",
"type": "tabs-item",
"data": {
"title": "JS"
},
"nodes": [
{
"object": "block",
"type": "paragraph",
...
}
]
},
...
]
}

Table

{
"object": "block",
"type": "table",
"nodes": [
{
"object": "block",
"type": "table-row",
"nodes": [
{
"object": "block",
"type": "table-cell",
"nodes": [
{
"object": "block",
"type": "paragraph",
...
}
]
},
...
]
},
...
]
}

Void Nodes

Images

Image blocks represent graphical images. The image can be stored either as an asset or as an external URL. For assets, the download URL can be fetched using the assets API.

{
"object": "block",
"type": "image",
"isVoid": true,
"data": {
}
}

Embeds

Embed blocks are used to integrate an external content into the document.

{
"object": "block",
"type": "embed",
"isVoid": true,
"data": {
"url": "https://www.youtube.com/watch?v=c5_rZDolFQ0"
}
}