Rate this page:
The heading
node represents a heading.
heading
is a top-level block node.
1 2 3 4 5 6 7 8 9 10 11 12
{
"type": "heading",
"attrs": {
"level": 1
},
"content": [
{
"type": "text",
"text": "Heading 1"
}
]
}
Name | Required | Type | Value |
---|---|---|---|
type | ✔ | string | "heading" |
content | array | Array of zero or more inline nodes | |
attrs | ✔ | object | |
attrs.level | ✔ | integer | 1-6 |
content
takes any inline node.
level
represents the depth of the heading following the same convention as HTML: when level is set to 1 it's the equivalent of <h1>
.Rate this page: