@wordpress/block-library
Version:
Block library for the WordPress editor.
33 lines (29 loc) • 600 B
JavaScript
/**
* WordPress dependencies
*/
import {
registerBlockType,
setDefaultBlockName,
} from '@wordpress/blocks';
/**
* Internal dependencies
*/
import * as code from './code';
import * as heading from './heading';
import * as more from './more';
import * as paragraph from './paragraph';
import * as image from './image';
import * as nextpage from './nextpage';
export const registerCoreBlocks = () => {
[
paragraph,
heading,
code,
more,
image,
nextpage,
].forEach( ( { name, settings } ) => {
registerBlockType( name, settings );
} );
};
setDefaultBlockName( paragraph.name );