The heading
node represents a heading.
heading
is a top-level block node.
1 2{ "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 |
attrs.localId | string | An ID to uniquely identify this node within the document. |
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: