Block

23 Sep 20251 minute to read

Defines the properties of block.

Properties

content ContentModel[]

Specifies the content of the block, which can vary based on the block type.
This property holds the actual content of the block.

Defaults to []

cssClass string

Specifies the CSS class applied to the block.
Allows custom styling by associating one or more CSS class names with the block.

Defaults to ’’

id string

Specifies the unique identifier for the block.
This property is used to uniquely identify each block.

Defaults to ’’

indent number

Specifies the indent for the block.
This property is used to specify indentation for each block.

Defaults to 0

parentId string

Specifies the unique identifier of the parent block.
This property is used to establish a hierarchical relationship between parent and child blocks.

Defaults to ’’

props BlockProperties|object

Specifies the type specific properties for the block.

Defaults to null

template string|HTMLElement|Function

Defines the template content for the block.

Defaults to ’’

type BlockType|string

Specifies the type of the block, which can be a string or a predefined BlockType.
This property determines the type of content the block holds.

Defaults to BlockType.Paragraph