@wordpress/block-library
Version: 
Block library for the WordPress editor.
26 lines (23 loc) • 438 B
JavaScript
/**
 * WordPress dependencies
 */
import { createBlock } from '@wordpress/blocks';
const transforms = {
	from: [
		{
			type: 'block',
			blocks: [ 'core/paragraph' ],
			transform: ( attributes ) =>
				createBlock( 'core/verse', attributes ),
		},
	],
	to: [
		{
			type: 'block',
			blocks: [ 'core/paragraph' ],
			transform: ( attributes ) =>
				createBlock( 'core/paragraph', attributes ),
		},
	],
};
export default transforms;