@wordpress/block-library
Version:
Block library for the WordPress editor.
23 lines (20 loc) • 397 B
JavaScript
/**
* WordPress dependencies
*/
import { createBlock } from '@wordpress/blocks';
const transforms = {
from: [
{
type: 'raw',
schema: {
'wp-block': { attributes: [ 'data-block' ] },
},
isMatch: ( node ) =>
node.dataset && node.dataset.block === 'core/nextpage',
transform() {
return createBlock( 'core/nextpage', {} );
},
},
],
};
export default transforms;