Docs: Add Block API Version 3#53046
Conversation
| This document lists the changes made between the different API versions. | ||
|
|
||
| ## Version 3 (>= WordPress 6.3) | ||
| - The post editor will be iframed if all registered blocks have a Block API version 3 or higher. Adding version 3 support means that the block should work inside an iframe, though the block may still be rendered outside the iframe if not all blocks support version 3. |
There was a problem hiding this comment.
Thank you for adding this :)
I think we should also note that the block editor gets only iframed if all blocks use apiVersion 3 and also no classic meta boxes like for example Yoast SEO are rendered…
That threw me when I ran into this updating all our blocks to get to this state
There was a problem hiding this comment.
Thanks for the addition.
shouldIframe={
(
( hasV3BlocksOnly || ( isGutenbergPlugin && isBlockBasedTheme ) )
&& ! hasMetaBoxes
)
|| isTemplateMode
|| deviceType === 'Tablet'
|| deviceType === 'Mobile'
}
fabiankaegy
left a comment
There was a problem hiding this comment.
I left one note on what I think would be a great addition. But approving as is :)
|
Flaky tests detected in 68b0601. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5689009552
|
What?
Adds Block API Version 3 to the docs.
More about the API Version and iframed editor:
https://make.wordpress.org/core/2023/07/18/miscellaneous-editor-changes-in-wordpress-6-3/
https://make.wordpress.org/core/2021/06/29/blocks-in-an-iframed-template-editor/