Search results

BlockModel API in React Blockeditor API component

Interface for a class Block

Properties

children

BlockModel[]

Represents the child blocks of the current block. This property contains an array of block models which are considered as children of the current block, allowing for hierarchical structures.

codeSettings

CodeSettingsModel

Specifies the code block configuration associated with this block. This property defines settings such as language, code content, theme, and syntax highlighting preferences.

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.

cssClass

string

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

id

string

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

imageSettings

ImageSettingsModel

Specifies the image block configuration associated with this block. This property defines settings such as save format, upload URLs, size constraints, display mode, and read-only preferences.

indent

number

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

isChecked

boolean

Specifies the checked state for the block. This property is applicable for blocks that support a checked state, such as checklist.

isExpanded

boolean

Specifies whether the block is expanded or collapsed. This property controls the visibility of child blocks within a hierarchical structure.

parentId

string

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

placeholder

string

Specifies placeholder text to display when the block is empty. This property provides a hint to the user about what to write.

template

string | function | JSX.Element | HTMLElement

Defines the template content for the block.

type

string | BlockType

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.