(Gutenberg Block Editor) Using editor.BlockEdit filter, need to alter html/ CSS class of BlockEdit Component

I was able to solve this by wrapping the BlockEdit component in my own markup:

    <Fragment>
      <div className="customClass">
        <BlockEdit { ...props }/>
      <div>
      <BlockControls>
        <Toolbar>
          <IconButton { ...iconProps } />
        </Toolbar>
      </BlockControls>
    </Fragment>

Leave a Comment