diff --git a/assets/src/block-templates/edit.js b/assets/src/block-templates/edit.js
index 370ed9a9ec..5112e807f9 100644
--- a/assets/src/block-templates/edit.js
+++ b/assets/src/block-templates/edit.js
@@ -1,11 +1,11 @@
-import {useBlockProps} from '@wordpress/block-editor';
+import {useBlockProps, InnerBlocks} from '@wordpress/block-editor';
export default function(template, templateLock = false) {
return props => {
return (
{
- wp.element.createElement(wp.blockEditor.InnerBlocks, {
+ wp.element.createElement(InnerBlocks, {
template: template(props.attributes ?? {}),
templateLock,
})
diff --git a/assets/src/blocks/Accordion/AccordionEditor.js b/assets/src/blocks/Accordion/AccordionEditor.js
index cece550cb2..2348493a1b 100644
--- a/assets/src/blocks/Accordion/AccordionEditor.js
+++ b/assets/src/blocks/Accordion/AccordionEditor.js
@@ -1,5 +1,5 @@
import {Fragment, useState} from '@wordpress/element';
-import {InspectorControls} from '@wordpress/block-editor';
+import {InspectorControls, RichText} from '@wordpress/block-editor';
import {URLInput} from '../../components/URLInput/URLInput';
import {
PanelBody,
@@ -9,7 +9,6 @@ import {
import {debounce} from 'lodash';
-const {RichText} = wp.blockEditor;
const {__} = wp.i18n;
// Renders the editor view
diff --git a/assets/src/blocks/Articles/ArticlesEditor.js b/assets/src/blocks/Articles/ArticlesEditor.js
index 1ae3cc182c..3ec185182d 100644
--- a/assets/src/blocks/Articles/ArticlesEditor.js
+++ b/assets/src/blocks/Articles/ArticlesEditor.js
@@ -5,7 +5,7 @@ import {
PanelBody,
Tooltip,
} from '@wordpress/components';
-import {InspectorControls} from '@wordpress/block-editor';
+import {InspectorControls, RichText} from '@wordpress/block-editor';
import withCharacterCounter from '../../components/withCharacterCounter/withCharacterCounter';
import TagSelector from '../../components/TagSelector/TagSelector';
import {PostSelector} from '../../components/PostSelector/PostSelector';
@@ -15,7 +15,6 @@ import {ArticlesList} from './ArticlesList';
import {useArticlesFetch} from './useArticlesFetch';
import {useSelect} from '@wordpress/data';
-const {RichText} = wp.blockEditor;
const {__} = wp.i18n;
const TextControl = withCharacterCounter(BaseTextControl);
diff --git a/assets/src/blocks/CarouselHeader/Caption.js b/assets/src/blocks/CarouselHeader/Caption.js
index 6d2a16904c..8c6db7efdf 100644
--- a/assets/src/blocks/CarouselHeader/Caption.js
+++ b/assets/src/blocks/CarouselHeader/Caption.js
@@ -1,4 +1,4 @@
-const {RichText} = wp.blockEditor;
+import {RichText} from '@wordpress/block-editor';
const {__} = wp.i18n;
export const Caption = ({slide, index, changeSlideAttribute}) => (
diff --git a/assets/src/blocks/Columns/ColumnsEditor.js b/assets/src/blocks/Columns/ColumnsEditor.js
index 6bc9000c6e..7b37909cfb 100644
--- a/assets/src/blocks/Columns/ColumnsEditor.js
+++ b/assets/src/blocks/Columns/ColumnsEditor.js
@@ -5,7 +5,7 @@ import {
} from '@wordpress/components';
import {useSelect} from '@wordpress/data';
import {useEffect} from '@wordpress/element';
-import {InspectorControls} from '@wordpress/block-editor';
+import {InspectorControls, RichText} from '@wordpress/block-editor';
import {URLInput} from '../../components/URLInput/URLInput';
import {EditableColumns} from './EditableColumns';
@@ -14,7 +14,6 @@ import {MAX_COLUMNS_AMOUNT, MIN_COLUMNS_AMOUNT} from './ColumnConstants';
import {getStyleFromClassName} from '../getStyleFromClassName';
const {__} = wp.i18n;
-const {RichText} = wp.blockEditor;
const renderEdit = (attributes, toAttribute, setAttributes, isSelected) => {
const {columns} = attributes;
diff --git a/assets/src/blocks/Columns/EditableColumns.js b/assets/src/blocks/Columns/EditableColumns.js
index 1c5800a549..e9f62faefe 100644
--- a/assets/src/blocks/Columns/EditableColumns.js
+++ b/assets/src/blocks/Columns/EditableColumns.js
@@ -1,11 +1,10 @@
import {LAYOUT_NO_IMAGE, LAYOUT_ICONS, LAYOUT_TASKS, LAYOUT_IMAGES} from './ColumnConstants';
-import {MediaUpload, MediaUploadCheck} from '@wordpress/block-editor';
+import {MediaUpload, MediaUploadCheck, RichText} from '@wordpress/block-editor';
import {Button} from '@wordpress/components';
import {ColumnsImagePlaceholder} from './ColumnsImagePlaceholder';
import {ImageHoverControls} from '../../components/ImageHoverControls';
const {__} = wp.i18n;
-const {RichText} = wp.blockEditor;
export const EditableColumns = ({
columns_block_style,
diff --git a/assets/src/blocks/Counter/CounterEditor.js b/assets/src/blocks/Counter/CounterEditor.js
index 174f139bb3..e49c9e43e6 100644
--- a/assets/src/blocks/Counter/CounterEditor.js
+++ b/assets/src/blocks/Counter/CounterEditor.js
@@ -1,5 +1,5 @@
import {Component, Fragment} from '@wordpress/element';
-import {InspectorControls} from '@wordpress/block-editor';
+import {InspectorControls, RichText} from '@wordpress/block-editor';
import {
TextControl,
TextareaControl,
@@ -10,7 +10,6 @@ import {URLInput} from '../../components/URLInput/URLInput';
import {CounterFrontend} from './CounterFrontend';
-const {RichText} = wp.blockEditor;
const {__} = wp.i18n;
export class CounterEditor extends Component {
diff --git a/assets/src/blocks/Covers/CoversEditor.js b/assets/src/blocks/Covers/CoversEditor.js
index 87376ba9b1..dbd20ee764 100644
--- a/assets/src/blocks/Covers/CoversEditor.js
+++ b/assets/src/blocks/Covers/CoversEditor.js
@@ -7,7 +7,7 @@ import {
} from '@wordpress/components';
import {useEffect} from '@wordpress/element';
-import {InspectorControls} from '@wordpress/block-editor';
+import {InspectorControls, RichText} from '@wordpress/block-editor';
import TagSelector from '../../components/TagSelector/TagSelector';
import {PostSelector} from '../../components/PostSelector/PostSelector';
import PostTypeSelector from '../../components/PostTypeSelector/PostTypeSelector';
@@ -17,7 +17,6 @@ import {useCovers} from './useCovers';
import {getStyleFromClassName} from '../getStyleFromClassName';
import {CoversCarouselLayout} from './CoversCarouselLayout';
-const {RichText} = wp.blockEditor;
const {__} = wp.i18n;
const renderEdit = (attributes, toAttribute, setAttributes) => {
diff --git a/assets/src/blocks/Gallery/GalleryEditor.js b/assets/src/blocks/Gallery/GalleryEditor.js
index 3e73ca6ffa..56dfa8319f 100644
--- a/assets/src/blocks/Gallery/GalleryEditor.js
+++ b/assets/src/blocks/Gallery/GalleryEditor.js
@@ -6,11 +6,8 @@ import {GalleryCarousel} from './GalleryCarousel';
import {GalleryThreeColumns} from './GalleryThreeColumns';
import {GalleryGrid} from './GalleryGrid';
import {useGalleryImages} from './useGalleryImages';
-import {InspectorControls} from '@wordpress/block-editor';
+import {InspectorControls, MediaPlaceholder, MediaUploadCheck, RichText} from '@wordpress/block-editor';
-import {MediaPlaceholder, MediaUploadCheck} from '@wordpress/blockEditor';
-
-const {RichText} = wp.blockEditor;
const {__} = wp.i18n;
const renderEdit = (attributes, setAttributes, isSelected) => {
diff --git a/assets/src/blocks/Happypoint/HappypointEditor.js b/assets/src/blocks/Happypoint/HappypointEditor.js
index cfa3e63530..700c4876ba 100644
--- a/assets/src/blocks/Happypoint/HappypointEditor.js
+++ b/assets/src/blocks/Happypoint/HappypointEditor.js
@@ -6,12 +6,12 @@ import {USE_NONE, USE_IFRAME_URL, USE_EMBED_CODE} from './HappyPointConstants';
import {debounce} from 'lodash';
-const {
+import {
InspectorControls,
BlockControls,
MediaUpload,
MediaUploadCheck,
-} = wp.blockEditor;
+} from '@wordpress/block-editor';
const {__} = wp.i18n;
diff --git a/assets/src/blocks/Media/MediaEditor.js b/assets/src/blocks/Media/MediaEditor.js
index a9f79bc8aa..f6adad214a 100644
--- a/assets/src/blocks/Media/MediaEditor.js
+++ b/assets/src/blocks/Media/MediaEditor.js
@@ -1,6 +1,6 @@
import {Fragment, useCallback} from '@wordpress/element';
import {PanelBody, TextControl} from '@wordpress/components';
-import {MediaPlaceholder, InspectorControls} from '@wordpress/block-editor';
+import {MediaPlaceholder, InspectorControls, RichText} from '@wordpress/block-editor';
import {debounce} from 'lodash';
import {MediaElementVideo} from './MediaElementVideo';
@@ -10,7 +10,6 @@ import {lacksAttributes} from './MediaBlock';
const {__} = wp.i18n;
const {apiFetch} = wp;
const {addQueryArgs} = wp.url;
-const {RichText} = wp.blockEditor;
const MediaInspectorOptions = ({attributes, setAttributes}) => {
const {media_url} = attributes;
diff --git a/assets/src/blocks/SocialMedia/SocialMediaEditorScript.js b/assets/src/blocks/SocialMedia/SocialMediaEditorScript.js
index 0eb1873029..3c382b8924 100644
--- a/assets/src/blocks/SocialMedia/SocialMediaEditorScript.js
+++ b/assets/src/blocks/SocialMedia/SocialMediaEditorScript.js
@@ -4,6 +4,7 @@ import {
RadioControl,
SelectControl,
PanelBody,
+ RichText,
} from '@wordpress/components';
import {SocialMediaEmbed} from './SocialMediaEmbed';
import {URLInput} from '../../components/URLInput/URLInput';
@@ -17,7 +18,6 @@ import {
ALLOWED_OEMBED_PROVIDERS,
} from './SocialMediaConstants.js';
-const {RichText} = wp.blockEditor;
const {__} = wp.i18n;
const {apiFetch} = wp;
const {addQueryArgs} = wp.url;
diff --git a/assets/src/blocks/SocialMediaCards/SocialMediaCards.js b/assets/src/blocks/SocialMediaCards/SocialMediaCards.js
index 8a3fd4112a..1006648285 100644
--- a/assets/src/blocks/SocialMediaCards/SocialMediaCards.js
+++ b/assets/src/blocks/SocialMediaCards/SocialMediaCards.js
@@ -1,9 +1,6 @@
import {Component, Fragment} from '@wordpress/element';
import {Preview} from '../../components/Preview';
-import {
- MediaUpload,
- MediaUploadCheck,
-} from '@wordpress/block-editor';
+import {MediaUpload, MediaUploadCheck} from '@wordpress/block-editor';
import {
TextControl,
diff --git a/assets/src/blocks/Submenu/SubmenuEditor.js b/assets/src/blocks/Submenu/SubmenuEditor.js
index ca679684ab..fa9de819e3 100644
--- a/assets/src/blocks/Submenu/SubmenuEditor.js
+++ b/assets/src/blocks/Submenu/SubmenuEditor.js
@@ -2,7 +2,7 @@ import {Fragment} from '@wordpress/element';
import {Button, PanelBody} from '@wordpress/components';
import {SubmenuLevel} from './SubmenuLevel';
import {SubmenuItems} from './SubmenuItems';
-import {InspectorControls} from '@wordpress/block-editor';
+import {InspectorControls, RichText} from '@wordpress/block-editor';
import {getSubmenuStyle} from './getSubmenuStyle';
import {makeHierarchical} from './makeHierarchical';
import {getHeadingsFromBlocks} from './getHeadingsFromBlocks';
@@ -10,7 +10,6 @@ import {useSelect} from '@wordpress/data';
import {deepClone} from '../../functions/deepClone';
const {__} = wp.i18n;
-const {RichText} = wp.blockEditor;
const renderEdit = (attributes, setAttributes) => {
function addLevel() {
diff --git a/assets/src/blocks/TakeActionBoxout/TakeActionBoxoutEditor.js b/assets/src/blocks/TakeActionBoxout/TakeActionBoxoutEditor.js
index 0aa6c8725e..06871f4f31 100644
--- a/assets/src/blocks/TakeActionBoxout/TakeActionBoxoutEditor.js
+++ b/assets/src/blocks/TakeActionBoxout/TakeActionBoxoutEditor.js
@@ -20,12 +20,12 @@ const {__} = wp.i18n;
// Planet 4 settings (Planet 4 >> Defaults content >> Take Action Covers default button text).
const DEFAULT_BUTTON_TEXT = window.p4bk_vars.take_action_covers_button_text || __('Take action', 'planet4-blocks');
-const {
+import {
RichText,
BlockControls,
MediaUpload,
MediaUploadCheck,
-} = wp.blockEditor;
+} from '@wordpress/block-editor';
export const TakeActionBoxoutEditor = ({
attributes,
diff --git a/assets/src/blocks/Timeline/TimelineEditorScript.js b/assets/src/blocks/Timeline/TimelineEditorScript.js
index 4f20dcbfb5..4a50ebfef5 100644
--- a/assets/src/blocks/Timeline/TimelineEditorScript.js
+++ b/assets/src/blocks/Timeline/TimelineEditorScript.js
@@ -5,7 +5,7 @@ import {
CheckboxControl,
Tooltip,
} from '@wordpress/components';
-import {InspectorControls} from '@wordpress/block-editor';
+import {InspectorControls, RichText} from '@wordpress/block-editor';
import {URLInput} from '../../components/URLInput/URLInput';
import {useScript} from '../../components/useScript/useScript';
@@ -15,7 +15,6 @@ import {languages} from './TimelineLanguages';
import {URLDescriptionHelp} from './URLDescriptionHelp';
import {debounce, noConflict} from 'lodash';
-const {RichText} = wp.blockEditor;
const {__} = wp.i18n;
const TIMELINE_JS_VERSION = '3.8.12';