diff --git a/block-dynamic/block.js b/block-dynamic/block.js index 1fb7198..2591562 100644 --- a/block-dynamic/block.js +++ b/block-dynamic/block.js @@ -6,7 +6,8 @@ // Required components const { __ } = wp.i18n; -const { registerBlockType, RichText } = wp.blocks; +const { registerBlockType } = wp.blocks; +const { RichText } = wp.editor; /** * Registers and creates block diff --git a/gutenberg-blocks-sample.php b/gutenberg-blocks-sample.php index b58702e..d22c2cb 100644 --- a/gutenberg-blocks-sample.php +++ b/gutenberg-blocks-sample.php @@ -275,7 +275,7 @@ public function register_dynamic_block_action ( ) { wp_enqueue_script( $script_slug, plugin_dir_url( __FILE__ ) . $block_name . '/block.build.js', - ['wp-blocks', 'wp-i18n', 'wp-element'], // Required scripts for the block + ['wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor'], // Required scripts for the block GBC_VERSION );