Blocks can only contain either other block nodes, or inlines and text nodes. Blocks either wrap other blocks, or contain actual content.
{"object": "block","type": "paragraph","nodes": [{"object": "text",...}]}
Headings are represents by text block with type being heading-1
, heading-2
or heading-3
.
{"object": "block","type": "heading-1","nodes": [{"object": "text",...}]}
{"object": "block","type": "blockquote","nodes": [{"object": "block","type": "paragraph","nodes": [...]}]}
{"object": "block","type": "hint","data": {"style": "info"},"nodes": [{"object": "block","type": "paragraph","nodes": [...]}]}
{"object": "block","type": "tabs","nodes": [{"object": "block","type": "tabs-item","data": {"title": "JS"},"nodes": [{"object": "block","type": "paragraph",...}]},...]}
{"object": "block","type": "table","nodes": [{"object": "block","type": "table-row","nodes": [{"object": "block","type": "table-cell","nodes": [{"object": "block","type": "paragraph",...}]},...]},...]}
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": {}}
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"}}