-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 have no inserter when core/paragraph is not in allowedBlocks #7763
Comments
Ok I've missed the fact that there is an ever-present inserter in the top left corner. And that works. I've just barely ever used it for some reason. Intuitively I figured it just inserts a new block to the bottom, but that's not the case.
Is it possible to do that though? Maybe an inserter with no popups, just pushes another specific block to the InnerBlocks. |
I'm reopening this cause it didn't pan out. The top left corner block inserter button only works when the InnerBlocks (or one of it's child blocks) is active, but if the InnerBlocks doesn't have a template, then it's impossible to make it active in order to insert a block into it. Having a template was perfect, because the InnerBlocks would already contain the item that is most likely wanted there, how ever upon refreshing the editor all the additional blocks that were not specified in the template prop are deleted.
So the above code is problematic when I want unlimited amount of |
I'm also seeing this issue in 3.2 with the exact same implementation. Even with |
The best way to solve this, in my opinion, is to change the sibling inserter to open the inserter menu directly. Pros of changing the sibling inserter to open the inserter menu directly include:
I can not think of any cons; can you? |
FYI - I think the issue of the vanishing blocks was fixed with pull request #7723 |
I think this issue can be closed thanks to #10136. I still maintain, however, that the sibling inserter should appear after the last block in a context, as the new non-Paragraph appender takes up space and makes the editor look less like the front-end. |
Agreed that #10136 closes this. If I've missed any reason why it shouldn't be closed feel free to request that it's reopened. |
This happened with 3.2 when the
core/paragraph
is no longer rendered (which is great).Describe the bug
<InnerBlocks>
have no block inserter whencore/paragraph
is not in theallowedBlocks
prop.Only way I can insert more blocks is to add a template with the block I want and then duplicate it.
Do I need to render the inserter myself?
To Reproduce
Steps to reproduce the behavior:
<wp.editor.InnerBlocks allowedBlocks={['custom/element']} />
There is not even the "inbetween" inserter, which usually allowed to add a block above a block, but not below for some reason.
The text was updated successfully, but these errors were encountered: