1

In the editor (Gutenberg) is there a way to disable specific settings in the right panel of a specific block?

For example each button in the buttons block has these settings I would like to disable:

Right column settings

I know with the color options here there is an editor styles palette I can return empty which will remove the color option - but this removes the color option across all blocks, I just want to remove these style based settings within the buttons block only.

I'm wondering if editor.BlockEdit may help here but not sure on how to target it to the buttons block or specify the restricted options within it.

I can also see posts referencing removeEditorPanel but that appears to be just for the page based options like featured image, page attributes, etc

Maybe the functionality to do this does not exist?

0

Removing specific panels or features for a block is done on a per block basis using various hooks (https://github.com/WordPress/gutenberg/issues/15450#issuecomment-635255936)

For the button block, that functionality does not yet exist. There is an existing ticket (one of the most popular tickets on the issue tracker) requesting this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.