@wordpress/block-library
Version:
Block library for the WordPress editor.
21 lines (18 loc) • 354 B
JavaScript
/**
* WordPress dependencies
*/
import { createBlock } from '@wordpress/blocks';
const transforms = {
to: [
{
type: 'block',
blocks: [ 'core/separator' ], // Transform to Separator.
transform: ( { anchor } ) => {
return createBlock( 'core/separator', {
anchor: anchor || '',
} );
},
},
],
};
export default transforms;