JavaScript for WordPress Forums Gutenberg Development Add class to container div? Reply To: Add class to container div?

#55550
jbr
Participant

Thanks, that’s definitely the right direction!

I’ve got

getEditWrapperProps() {
         
              return { 'class': 'editor-block-list__block EXTRA CLASSES HERE' };
          
      },

The problem I’m having now is that any custom class I have is being removed when the block is selected or hovered, and replaced with

editor-block-list__block is-selected or editor-block-list__block is-hovered, and then back to editor-block-list__block

Any idea if there’s a way to keep the class added? It looks like the editor completely replaces the classes on the div rather than just toggling specific ones.