Skip to content

buildDefaultBlock

buildDefaultBlock(props): GenericBlock

Defined in: packages/core/src/fields/blocks/utils.ts:17

Builds the default value for a new block of the given type.

Input props.

BlockConfig

The block type to build a default value for.

GenericBlock

A new block object with a fresh id, blockType, and each sub-field initialised to its defaultValue (or null). blockName is left unset so the admin UI’s placeholder (the block’s label) shows.