How can I add Block Style support to the core HTML block in Gutenberg?


The HTML block in Gutenberg can be given styles like so:

// JS file, enqueued using the action "enqueue_block_editor_assets" wp.blocks.registerBlockStyle( 'core/html', {     name: 'full-width-video',     label: 'Full Width Video' } ); 

resulting custom html block with styles

To compare, I also applied that style to the core/preformatted. I selected it for both blocks on a post.

However, the class does not get added to the Custom HTML block:

<div class="wp-block-html">(html that I entered)</div>  <pre class="wp-block-preformatted is-style-full-width-video">(html that i entered)</pre> 

I believe it is one of the “supports” options that prevents the styles from being applied but I am not sure how to edit that for a core block.

Anyone know how I can add support for styles on the core HTML block?

Thanks!