Gutenberg: Gutenberg templates - Ability to restrict removal of template blocks

Created on 31 Aug 2017  路  5Comments  路  Source: WordPress/gutenberg

I'd really like to be able to ensure a Gutenberg template is locked from modification. I'd like them to be able to add blocks around the template as necessary, but the template itself I'd like to have those blocks locked from being removed themselves.

Is there a config I should use for that, or is it not supported?

[Feature] Block API [Type] Task

Most helpful comment

It's not yet supported, but makes total sense. I'd imagine it would be a locked: true prop during registration. The block would not get movers nor be deletable, but its content still editable. Would that match your need?

All 5 comments

It's not yet supported, but makes total sense. I'd imagine it would be a locked: true prop during registration. The block would not get movers nor be deletable, but its content still editable. Would that match your need?

I've been working on this for a client, and think I have come up with some reasonable ideas to implement block templates. "locked" blocks are a part of that system, as well as deleteable: false.

Exactly! Also, the ability to lock the the whole template down from adding any new blocks. But that may be separate from this.

Great idea. What would be really superb though is if something like position: bottom or position: top could be added.

If it was possible to add obligatory, non-deletable, non-moveable blocks either above or below the content area it would be a big step towards enabling the replacement of all metaboxes with blocks.

I'm closing this in favor of #1684

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wpalchemist picture wpalchemist  路  3Comments

spocke picture spocke  路  3Comments

maddisondesigns picture maddisondesigns  路  3Comments

maddisondesigns picture maddisondesigns  路  3Comments

mhenrylucero picture mhenrylucero  路  3Comments