diff --git a/packages/block-editor/src/components/inner-blocks/README.md b/packages/block-editor/src/components/inner-blocks/README.md index 92d4fdb5739cec..54494aa9838dbe 100644 --- a/packages/block-editor/src/components/inner-blocks/README.md +++ b/packages/block-editor/src/components/inner-blocks/README.md @@ -189,19 +189,22 @@ For example, a button block, deeply nested in several levels of block `X` that u ### `defaultBlock` - **Type:** `Object` -- **Default:** - `undefined` +- **Default:** - `undefined`. Determines which block type should be inserted by default and any attributes that should be set by default when the block is inserted. Takes an array in the form of `{ name: 'namespace/block-name', attributes: {} }`. -Determines which block type should be inserted by default and any attributes that should be set by default when the block is inserted. Takes an object in the form of `{ name: blockname, attributes: {blockAttributes} }`. +#### Example usage ```jsx -const DEFAULT_BLOCK = { name: 'core/paragraph', attributes: { content: 'Lorem ipsum...' } }; -... +// Define a specific block and it's attributes as the default block for initialh insertion ``` +![defaultBlock-api-example](https://github.com/WordPress/gutenberg/assets/180264/fceaf2bb-a412-4a4b-8031-c431dbe8bb36) + + + ### `directInsert` - **Type:** `Boolean`