Bullet List
Below you can view an example of the bullet list block in JSON format.
{
"type": "bullet_list",
"attrs": {
"blockId": "blockId"
},
"content": [
{
"type": "list_item",
"attrs": {
"blockId": "blockId"
},
"content": [
{
"type": "paragraph",
"attrs": {
"align": "left",
"blockId": "blockId",
"dropCap": false
},
"content": [
{
"type": "text",
"text": "This is a list item"
}
],
"contentHTML": "This is a list item"
}
],
"contentHTML": "<p>This is a list item</p>"
}
],
"contentHTML": "<li><p>This is a list item</p></li>"
}
Bullet list blocks will automatically nest themselves whenever there is a new list item added. If you were to add a new list item, a new content
array of objects would be created inside the content
array of the bullet list object. Any changes made to the text in itself (i.e. making it bold or italic) would make paragraph nesting rules also apply. See the paragraph documentation here.
Below you can read details about each attribute of the bullet list block.
type
A string that represents the type of the block. Bullet list blocks will always display bullet_list
as their type. List items will display list_item
as their type.
text
A string that represents the text written by the user.
marks
An array of objects that represents the marks of the block. This value can be something like bold
or italic
.
content
An array of objects that represents the content of the block.
attrs
An object that represents the attributes of the block.
attrs.align
A string that represents the bullet list alignment. This value can be left
, center
, or right
.
attrs.blockId
A string that represents the unique block ID of the bullet list.
contentHTML
A string that represents the generated HTML of the block.