From 0fa652ac4f078ef11a83f3383fce8e3288f2a798 Mon Sep 17 00:00:00 2001 From: Damon Cook Date: Thu, 7 Dec 2023 12:59:47 -0500 Subject: [PATCH] Update InnerBlocks defaultblock doc usage (#56728) Co-authored-by: Riad Benguella --- .../src/components/inner-blocks/README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/inner-blocks/README.md b/packages/block-editor/src/components/inner-blocks/README.md index 0f5d303b8c791..92d4fdb5739ce 100644 --- a/packages/block-editor/src/components/inner-blocks/README.md +++ b/packages/block-editor/src/components/inner-blocks/README.md @@ -188,8 +188,19 @@ For example, a button block, deeply nested in several levels of block `X` that u ### `defaultBlock` -- **Type:** `Array` -- **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 `[ blockname, {blockAttributes} ]`. +- **Type:** `Object` +- **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 object in the form of `{ name: blockname, attributes: {blockAttributes} }`. + +```jsx +const DEFAULT_BLOCK = { name: 'core/paragraph', attributes: { content: 'Lorem ipsum...' } }; +... + +``` ### `directInsert`