@wordpress/block-library
Version:
Block library for the WordPress editor.
24 lines (21 loc) • 326 B
JavaScript
/**
* WordPress dependencies
*/
import { createBlock } from '@wordpress/blocks';
const transforms = {
from: [
{
type: 'enter',
regExp: /^-{3,}$/,
transform: () => createBlock( 'core/separator' ),
},
{
type: 'raw',
selector: 'hr',
schema: {
hr: {},
},
},
],
};
export default transforms;