Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<InnerBlocks /> markup #29482

Closed
aminta opened this issue Mar 2, 2021 · 2 comments
Closed

<InnerBlocks /> markup #29482

aminta opened this issue Mar 2, 2021 · 2 comments

Comments

@aminta
Copy link

aminta commented Mar 2, 2021

Using in a block, Wp Gutenberg automatically creates this markup in editor between the block and its content

<div class="block-editor-inner-blocks">
 <div class="block-editor-block-list__layout">
     // [...here the content ]

However looking at the code generated by the core columns block, the columns are direct children of their container.

Is it possible implement this feature?

@stokesman
Copy link
Contributor

See the use of useInnerBlocksProps in the Buttons block (or any of the other core blocks that use it).
https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-library/src/buttons/edit.js

@talldan
Copy link
Contributor

talldan commented Mar 3, 2021

The useInnerBlocksProps feature is still experimental, so not recommended right now for plugins as the API may change.

It should hopefully be something that stabilises soon and at that point there will be docs on how to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants