block-editor
InnerBlocks breaks Flexbox and CSS Grid styles
When using InnerBlocks so you can nest parent/child blocks you end up with additional HTML (in the editor) wrapping the child elements like so:
How to select block variation from BlockVariationPicker
I have a custom block that has block variations. If I make the scope of the variations “inserter”, they work as expected. But if I make the scope “block” and use BlockVariationPicker so the user chooses a variation upon adding a block (like they do when adding the core columns block), nothing happens when I click on a variation icon.
How to transform a legacy widget into a block
WP 5.8 (not released yet) will include support for transforming legacy widgets into blocks. I have a custom legacy widget I’m trying to add support for transforming it into a block. Reading the docs I added the following code to one of my blocks. My legacy widget had two attributes (attribute1 and attribute2):
Gutenberg: Block validation Failed Richtext undefined
I am building a custom block to add a youtube-video as a background-video that autoplays and infinite loops when you visit the site. To make this happen the user needs to get the video-link and playlist-link (for the loop) and put it into the 2 Richtext input fields I created in the block. Once that is done the video will start playing alredy in the backend to get a better view on how it will look on the site. Now when you save the Block the code will be generated on the frontend as expected but as soon as you refresh the backend page the block will be broken and the following message will be displayed in the console:
Gutenberg Block showing invalid content on edit
My requirement: I am trying to create a simple gutenberg block which will have a textarea and a dropdown. Once a user has provided the details I want to save it as a shortcode in DB, but when the user come to edit the block it should show the content in textarea and selected item in dropdown.
How to know whether you are editing a page or a post?
I have different styles applied to pages (I hide the title for them) and posts (I don’t want to hide the title here, but style the date of the post). I want to style them differently, which ist possible on the site itself. But in the editor I don’t seem to have the possibility to distinguish between pages and posts.
Custom WP Block using Inner Blocks crashes editor, doesn’t save content
I’ve finally gotten around to building a custom Gutenberg/WP Block for a project and it’s basically kicking my ass. Working with React, Node, WebPack, Gulp is all new enough to me so there’s a learning curve I have to deal with but the incomplete and inaccurate documentation from WP is making things substantially worse. (Their documentation still says to use wp.editor but reading through tickets in GitHub I learned that was deprecated and should instead be wp.blockEditor, as an example.)
Search for a keyword across post types in a Gutenberg component
In a Gutenberg component I’m developing, I have a function that searches for a keyword across multiple post types specified in a constant:
Dynamic Gutenburg block output echoes in WP Dashboard
I’m building a dynamic block in a custom plugin that shows code in my blog posts. I’m struggling with this bug where the output of the render_callback function gets echoed out to the WP dashboard when editing that post.