Represents an item in either a bulletList or an orderedList.
Only the nodes that implement the ListItemContent marker interface are permitted as content. Additionally, although codeBlock and paragraph nodes are permitted as content, they are not allowed to use any marks.
Finally, although listItem nodes may contain a nested bulletList or orderedList, these are disallowed for the first content item. If there is nothing else to display before the nested list, use an empty paragraph to work around this limitation.
This library tries very hard to use the compiler’s type system to enforce correctness wherever it can. However, since bulletList and orderedList must implement ListItemContent so that they can be added as content at all, there was no way to exclude them from satisfying the type system when adding the first content item. This must therefore be checked at runtime and will result in a runtime exception when this constraint is violated.
1 2ul(li("Hello world"));
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20{ "type": "bulletList", "content": [ { "type": "listItem", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "Hello world" } ] } ] } ] }
| Confluence | Jira |
|---|---|
| ✅ | ✅ |
❌ N/A
listItemlocalId, when present, will typically be a random UUID. This is not enforced by the schema.↩︎Rate this page: