How to retrieve the post featured image (thumbnail) ID in Gutenberg blocks?

I think you’re looking for: const featuredImageId = wp.data.select( ‘core/editor’ ) .getEditedPostAttribute( ‘featured_media’ ); to get the ID of the featured image and then for the corresponding media object: const media = featuredImageId ? wp.data.select( ‘core’).getMedia( featuredImageId ) : null; See e.g. here in the post featured image component: https://github.com/WordPress/gutenberg/blob/57c2ab37a872b63de215205458336b7fd6c9739d/packages/editor/src/components/post-featured-image/index.js#L105

Gutenburg InnerBlock single child

The only way to do this at the moment is by using the renderAppenderprop onInnerBlocks. This prop is only available in the Gutenberg plugin until WordPress 5.3 is released. The theory would be to use state in each CustomCard to track if there has been a block added, then return false from the renderAppender function … Read more

Gutenberg Blocks – Change EDIT part of the block using editor.BlockEdit filters. How to change the markup?

Unfortunately there is now way to alter the markup of an existing block apart from wrapping it in additional markup: It receives the original block BlockEdit component and returns a new wrapped component. Source: https://developer.wordpress.org/block-editor/developers/filters/block-filters/#editor-blockedit To achieve what you want in the editor currently the only way would be to create your own version of … Read more