Update: WordPress 5.6 will be released soon and this will include a block API version 2 which allows all these modifications noted in OP.
https://make.wordpress.org/core/2020/11/18/block-api-version-2/
I found a filter that allows me to modify the wrapper. Still, I can’t change the HTML tag, but it’s better than nothing.
const { createHigherOrderComponent } = wp.compose;
const withClientIdClassName = createHigherOrderComponent( ( BlockListBlock ) => {
return ( props ) => {
const newClassName = "block-" + props.clientId + ' sample-block';
return <BlockListBlock { ...props } className={ newClassName } />;
};
}, 'withClientIdClassName' );
wp.hooks.addFilter( 'editor.BlockListBlock', 'awps/modify-blocks-wrapper', withClientIdClassName );
And the methods:
edit: () => {
return (
<mark>Sample</mark>
);
},
save: () => {
return (
<span className="sample-block">
<mark>Sample</mark>
</span>
);
},