Disable Drop Cap in WordPress 5.5

The WordPress Gutenberg editor launched with a curious feature cribbed from Medium.com editor: an option to add a drop cap to a paragraph. This feature doesn’t seem very useful on most sites, especially client sites adhering to a design layout.

However, this feature cannot be easily disabled. In earlier Gutenberg version there was a CSS hack that could be used but it doesn’t work in current WordPress versions because the HTML structure was modified.

Thankfully in the latest WordPress 5.5, an experimental feature has been added that can be used to disable the drop cap using the following JavaScript:

var removeDropCap = function(settings, name) { if (name !== "core/paragraph") { return settings; } var newSettings = Object.assign({}, settings); if ( newSettings.supports && newSettings.supports.__experimentalFeatures && newSettings.supports.__experimentalFeatures.typography && newSettings.supports.__experimentalFeatures.typography.dropCap ) { newSettings.supports.__experimentalFeatures.typography.dropCap = false; } return newSettings; }; wp.hooks.addFilter( "blocks.registerBlockType", "sc/gb/remove-drop-cap", removeDropCap );

Enjoy your Drop Cap free editor!


I released a plugin so you can get functionality by simply installing and activating a plugin.

Edit 2:

The JavaScript approach does not work in WordPress 5.6 anymore, but you can still disable Drop Cap with the following PHP code:

add_filter( 'block_editor_settings', function ($editor_settings) { $editor_settings['__experimentalFeatures']['global']['typography']['dropCap'] = false; return $editor_settings; } );

Or you can download the plugin which I will be updating every time WordPress has a major update 🙂