diff --git a/src/index.js b/src/index.js index 2526010..9d20a20 100644 --- a/src/index.js +++ b/src/index.js @@ -11,6 +11,7 @@ import { ColorPicker, PanelBody, ToolbarGroup, + // use __experimentalToolbarItem as ToolbarItem does not seem to be present(?) __experimentalToolbarItem as ToolbarItem, } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; @@ -18,16 +19,19 @@ import { __ } from '@wordpress/i18n'; const NAMESPACE = 'namespace'; // TODO const SLUG = 'slug'; // TODO const BLOCK_TITLE = 'Block Title'; // TODO +const BLOCK_CATEGORIES = ['common', 'formatting', 'layout', 'widgets', 'embed']; +const BLOCK_CATEGORY = BLOCK_CATEGORIES[3]; const INNER_TEMPLATE = [ ['core/heading', { placeholder: 'Article Title', className: 'heading' }], ['core/paragraph', { placeholder: 'Article Text', className: 'text' }], ]; +const ALLOWED_BLOCKS = ['core/image', 'core/paragraph']; registerBlockType(`${NAMESPACE}/${SLUG}`, { title: __(BLOCK_TITLE, NAMESPACE), - category: 'widgets', + category: BLOCK_CATEGORY, supports: { // Removes support for an HTML mode. @@ -87,6 +91,7 @@ registerBlockType(`${NAMESPACE}/${SLUG}`, {