diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 10ceb797e28c0..db5dcb6289aff 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -255,7 +255,7 @@ Hide and show additional content. ([Source](https://github.com/WordPress/gutenbe - **Name:** core/details - **Category:** text - **Supports:** align (full, wide), anchor, color (background, gradients, link, text), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** allowedBlocks, name, showContent, summary +- **Attributes:** allowedBlocks, name, placeholder, showContent, summary ## Embed diff --git a/packages/block-library/src/details/block.json b/packages/block-library/src/details/block.json index e4fadc4a064f9..19d5c554cd26d 100644 --- a/packages/block-library/src/details/block.json +++ b/packages/block-library/src/details/block.json @@ -25,6 +25,9 @@ }, "allowedBlocks": { "type": "array" + }, + "placeholder": { + "type": "string" } }, "supports": { diff --git a/packages/block-library/src/details/edit.js b/packages/block-library/src/details/edit.js index b7e8f815e21c0..89221c96bb8cc 100644 --- a/packages/block-library/src/details/edit.js +++ b/packages/block-library/src/details/edit.js @@ -31,7 +31,8 @@ const TEMPLATE = [ ]; function DetailsEdit( { attributes, setAttributes } ) { - const { name, showContent, summary, allowedBlocks } = attributes; + const { name, showContent, summary, allowedBlocks, placeholder } = + attributes; const blockProps = useBlockProps(); const innerBlocksProps = useInnerBlocksProps( blockProps, { template: TEMPLATE, @@ -100,7 +101,7 @@ function DetailsEdit( { attributes, setAttributes } ) {