-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
Needs Technical FeedbackNeeds testing from a developer perspective.Needs testing from a developer perspective.[Block] CoverAffects the Cover Block - used to display content laid over a background imageAffects the Cover Block - used to display content laid over a background image[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Description
What problem does this address?
It would be great to have an option to pass allowedBlocks to cover block.
A cover usually consists of a combination of the following blocks: heading, paragraph, list, and button. The ability to add other core blocks makes it easy for people to make frontend... bad.
I saw someone else PR of the same problem for the column, so I decided to apply for a cover block as well. 😃
(#18164, #25183, #25778)
Example
const ALLOWED_BLOCKS = [
"core/paragraph",
"core/heading",
"core/button",
];
const TEMPLATE = [
[ 'core/cover',
{
customOverlayColor: '#150F45',
dimRatio: 100,
allowedBlocks: ALLOWED_BLOCKS,
},
[
[ 'core/heading', {
level: 1,
content: __( 'Page Title' ),
align: 'left',
} ],
[ 'core/paragraph', {
content: __( 'Lorem ipsum dolor sit amet' ),
align: 'left',
} ],
],
],
];
Metadata
Metadata
Assignees
Labels
Needs Technical FeedbackNeeds testing from a developer perspective.Needs testing from a developer perspective.[Block] CoverAffects the Cover Block - used to display content laid over a background imageAffects the Cover Block - used to display content laid over a background image[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.A suggestion for improvement.