List
Class: Chunk OboNode Full Name: ObojoboDraft.Chunks.ListA bulleted or numeric list similar to <ul>
or <li>
elements in HTML.
Properties
Property | Required | Type | Description |
---|---|---|---|
textGroup | Required | textGroup | Expects 1 or more text items. |
listStyles | no | listStyle | This defines various options for the list |
Supported Trigger Types
Action Type | Description |
---|---|
onMount | Fired when a node is added to the DOM |
onUnmount | Fired when a node is removed from the DOM |
Required Children
None
Variables Registered
None
Example
JSON (Unordered list)
{
"type": "ObojoboDraft.Chunks.List",
"id": "...",
"content": {
"textGroup": [
{
"text": {
"value": "List item 1"
}
},
{
"text": {
"value": "List item 2"
},
"data": {
"indent": 1
}
}
]
}
}
XML (Unordered list)
<List>
<textGroup>
<t>List item 1</t>
<t indent="1">List item 2</t>
</textGroup>
</List>
OboHTML (Unordered list)
<ul>
<li>List item 1</li>
<li indent="1">List item 2</li>
</ul>
JSON (Ordered list)
{
"type": "ObojoboDraft.Chunks.List",
"id": "...",
"content": {
"listStyles": {
"type": "ordered"
},
"textGroup": [
{
"text": {
"value": "List item 1"
}
},
{
"text": {
"value": "List item 2"
},
"data": {
"indent": 1
}
}
]
}
}
XML (Ordered list)
<List>
<listStyles>
<type>ordered</type>
</listStyles>
<textGroup>
<t>List item 1</t>
<t indent="1">List item 2</t>
</textGroup>
</List>
OboHTML (Ordered list)
<ol>
<li>List item 1</li>
<li indent="1">List item 2</li>
</ol>