Node - orderedList

Purpose

The orderedList node is a container for listItem nodes.

It's the ordered equivalent of bulletList.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "type": "orderedList",
  "attrs": {
    "order": 3
  },
  "content": [
    {
      "type": "listItem",
      "content": [
        {
          "type": "paragraph",
          "content": [
            {
              "type": "text",
              "text": "Hello world"
            }
          ]
        }
      ]
    }
  ]
}

Content

orderedList is a block node in the top-level blocks group that contains listItem nodes as children.

Fields

NameMandatoryTypeValueNotes
typestring"orderedList"
contentarrayArray of listItem nodes
attrsobject
attrs.orderintegerFirst list item numbere.g. 3 would mean the list starts at number three. When not specified, the list starts from 1