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.
Parameters
Section titled “Parameters”Input props.
blockDef
Section titled “blockDef”The block type to build a default value for.
Returns
Section titled “Returns”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.