Skip to main content

Factbox

Below you can view an example of the factbox block in JSON format.

{
"type": "codex_factbox",
"attrs": {
"blockId": "blockId"
},
"content": [
{
"type": "paragraph",
"attrs": {
"align": "left",
"blockId": "blockId",
"dropCap": false
},
"content": [
{
"type": "text",
"text": "This is a factbox"
}
],
"contentHTML": "This is a factbox"
}
],
"contentHTML": "<p>This is a factbox</p>"
}
info

Factbox blocks will automatically nest themselves whenever there is a disruption from regular writing. If you were to make a certain part of the paragraph bold, a new content array of objects would be created inside the pre-existing content array.

Below you can read details about each attribute of the factbox block.

type​

A string that represents the type of the block. Factbox blocks will always display codex_factbox 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 factbox alignment. This value can be left, center, or right.

attrs.blockId​

A string that represents the unique block ID of the factbox.

contentHTML​

A string that represents the generated HTML of the factbox.