• I am working on a client theme, where buttons should always be in bold, non-italic text. We don’t want the client to be able to spoil the design with the wrong formatting, or to confuse them with unnecessary styling options. Is there a way to disable the Bold and Italic formatting buttons for the core/button block, that appear in the block editor toolbar? Is there a general way to add and remove formatting buttons for all blocks? It seems to me this is crucial to developing client sites but I can’t see options for it anywhere.

    I tried making a custom button block to get round this, but I couldn’t get it to work properly so I am trying to use core blocks as much as possible.

Viewing 3 replies - 1 through 3 (of 3 total)
  • lisa

    (@contentiskey)

    *you might be able to make your desired changes to available options using theme.json file and/or creating a block variation for the specific core blocks or locking blocks.

    *which theme are you using? (some themes already have a theme.json file included, for some older themes, a theme.json file can be added)

    *community resources I have found helpful:
    https://developer.www.ads-software.com/themes/advanced-topics/theme-json/
    https://www.youtube.com/c/DaisyonWP (videos about how to use theme.json)


    • This reply was modified 2 years, 1 month ago by lisa.
    Thread Starter julian_wave

    (@julian_wave)

    Thanks Lisa,

    I’m making a custom theme, based on underscores.

    I already have a theme.json – as far as I can tell, you can use this to alter some of the things you see in the block settings tab, but I don’t think you can use it to add or remove things from the block editor toolbar.

    I haven’t tried block variations, but I have a feeling they won’t work either for changing the block editor toolbar. However I’ll take a deeper look – I’ll be really pleased if it works.

    lisa

    (@contentiskey)

    @julian_wave In addition to the videos and links I suggested, I have been participating in a free weekly zoom discussion group that has been helpful with learning about block and theme customizations. (look up #BuildModeLive on Twitter and request link to signup)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Gutenberg: disable formatting buttons’ is closed to new replies.