1. Notion original
2. Notion API
{
"object": "block",
…
"type": "heading_1",
"heading_1": {
"text": [
{
"type": "text",
"text": {
"content": "Heading 1",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Heading 1",
"href": null
}
]
}
},
{
"object": "block",
"id": "520e88c3-3173-4eb2-b801-aa6eaeedef81",
"created_time": "2022-01-20T00:36:00.000Z",
"last_edited_time": "2022-01-20T00:41:00.000Z",
"has_children": false,
"archived": false,
"type": "heading_2",
"heading_2": {
"text": [
{
"type": "text",
"text": {
"content": "Heading 2",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Heading 2",
"href": null
}
]
}
},
{
"object": "block",
"id": "dfa5ea1f-cbe0-4d90-923f-394d2effe83b",
"created_time": "2022-01-20T00:37:00.000Z",
"last_edited_time": "2022-01-20T00:41:00.000Z",
"has_children": false,
"archived": false,
"type": "heading_3",
"heading_3": {
"text": [
{
"type": "text",
"text": {
"content": "Heading 3",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Heading 3",
"href": null
}
]
}
}
javascript
3. Svelte output
<Header level={1}>Heading 1</Header>
<Header level={2}>Heading 2</Header>
<Header level={3}>Heading 3</Header>
html
4. Example rendering
Heading 1
Heading 2
Heading 3
🏠 Browse the docs ⚘
High-level Discussion
Turn-intoable Block Components
Toggle Headings (not yet implemented)
Layout-only Components
Page-level Components
Annotation Components
bold → <strong>
italic → <em>
strikethrough → <s>