You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When editing a full site page, we should make the post content block unremovable in order to avoid having pages without, well, content 😄.
Apart from losing the content, if a user remove the a8c/post-content block will result in an editor with the post title missing, given that since #34296 we're rendering the post title as part of the post content block when editing a full site page (and adding a show-post-title-before-content class to the body element that would keep the regular editor post title hidden).
The text was updated successfully, but these errors were encountered:
This PR replaces the block inserter in the header toolbar
with a custom one that ensures that new blocks are appended
inside the post content block.
Since the default inserter in the header toolbar rendered by
Gutenberg doesn't set any rootClientId, we cannot define which
block should contain any new inserted block.
This PR aims to solve that by rendering a replica of the same
header inserter but using the client id of the post content block
as rootClientId. The same client id is also used now when inserting
a starter page template to avoid that content being appended after
the footer (#34330).
In order to don't display the default header inserter, we lock the
template making impossible to insert new blocks in the root
(thus the header doesn't show the default block inserter).
But this also prevents the user from removing existing blocks,
which solves the issue of having the post content block
removable (#34331).
When editing a full site page, we should make the post content block unremovable in order to avoid having pages without, well, content 😄.
Apart from losing the content, if a user remove the
a8c/post-content
block will result in an editor with the post title missing, given that since #34296 we're rendering the post title as part of the post content block when editing a full site page (and adding ashow-post-title-before-content
class to thebody
element that would keep the regular editor post title hidden).The text was updated successfully, but these errors were encountered: