How to add a custom CSS class to core blocks in Gutenberg editor?
There are issues in the answer marked as correct. It will break the alignment class functionality, and is not actually adding to the classList, instead it is overriding it. And you will only be able to use that one solution for your whole theme. Instead you can use “registerBlockStyle()” to add a style variation to … Read more