Skip to content

Instantly share code, notes, and snippets.

@barryceelen
Created October 5, 2018 18:12
const {
registerBlockType,
} = wp.blocks;
const {
InnerBlocks,
} = wp.editor;
export default registerBlockType( 'test/should-not-accept-paragraph', {
title: 'Test Block',
category: 'common',
attributes: {},
edit: props => {
return (
<InnerBlocks
allowedBlocks={ [ 'core/html' ] }
/>
)
},
save: function( props ) {
return null;
},
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment