The orderedList
node is a container for a numbered list of items. It's the ordered equivalent of bulletList
.
orderedList
is a top-level block node.
1 2{ "type": "orderedList", "attrs": { "order": 3 }, "content": [ { "type": "listItem", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "Hello world" } ] } ] } ] }
Name | Required | Type | Value |
---|---|---|---|
type | ✔ | string | "orderedList" |
content | ✔ | array | An array of nodes |
attrs | object | ||
attrs.order | integer | A positive integer greater than or equal to 0 |
content
can contain one or more listItem
nodes.
order
defines the number of the first item in the list. For example, 3
would mean the list starts at number three. When not specified, the list starts from 1.
Rate this page: