The WordPress block editor (a.k.a. Gutenberg) allows formatting in RichText fields via the Formatting Toolbar API. Each type of formatting (e.g. Bold and Italic) is a formatType. Here we’ll look at removing one of these formatTypes from a specific block type (e.g. removing Bold from the core paragraph block).
Removing FormatType from All Blocks
We can remove a formatType from all blocks using the unregisterFormatType() method.
e.g. we can remove the bold formatType from all blocks with this JavaScript code.
wp.richText.unregisterFormatType('core/bold');
You can even run this from the browser console, leaving the bold formatType on blocks like the list but removing bold formatType from paragraphs.
With Bold FormatType

Without Bold FormatType

Removing FormatType from One Block Type
This code removes the bold format type from the core/paragraph block (leaving bold for all other block types).
origBoldFormatType = wp.data.select('core/rich-text')?.getFormatType('core/bold');
if (origBoldFormatType) {
const { edit } = origBoldFormatType;
wp.richText.unregisterFormatType('core/bold');
wp.richText.registerFormatType('core/bold', {
...origBoldFormatType,
edit: (props) => {
if ('core/paragraph' === wp.data.select('core/block-editor').getSelectedBlock()?.name) {
// Do not render core bold formatType (i.e. no button, no keyboard shortcut).
return null;
}
// Render the original bold formatType (i.e. button, keyboard shortcut).
return edit(props);
},
});
}
This JavaScript code works by:
– storing a copy of the bold formatType in origBoldFormatType
– removing the bold formatType from all blocks
– registering a new formatType with the same core/bold name
– this new formatType has an if conditional in the edit function
– when the currently selected block is core/paragraph it returns null (rendering nothing)
– for any other block type, the edit function from the origBoldFormatType is used (rendering the bold formatType)
The result is the bold formatType appears for all blocks except core/paragraph.
This can also be run from the browser console.

Thank you, you’re a lifesaver! I lost half my hair as I couldn’t find a solution for removing bold and italic from core/button.