Add classname to Gutenberg block wrapper in the editor?
Actually it can be done with the filter: const { createHigherOrderComponent } = wp.compose; const withCustomClassName = createHigherOrderComponent( ( BlockListBlock ) => { return ( props ) => { if(props.attributes.size) { return <BlockListBlock { …props } className={ “block-” + props.attributes.size } />; } else { return <BlockListBlock {…props} /> } }; }, ‘withClientIdClassName’ ); wp.hooks.addFilter( … Read more