diff --git a/packages/block-editor/src/components/block-canvas/index.js b/packages/block-editor/src/components/block-canvas/index.js index fea9689cea5e7..c6a47b7b5533c 100644 --- a/packages/block-editor/src/components/block-canvas/index.js +++ b/packages/block-editor/src/components/block-canvas/index.js @@ -14,6 +14,7 @@ import Iframe from '../iframe'; import WritingFlow from '../writing-flow'; import { useMouseMoveTypingReset } from '../observe-typing'; import { useBlockSelectionClearer } from '../block-selection-clearer'; +import { useBlockCommands } from '../use-block-commands'; export function ExperimentalBlockCanvas( { shouldIframe = true, @@ -23,6 +24,7 @@ export function ExperimentalBlockCanvas( { contentRef: contentRefProp, iframeProps, } ) { + useBlockCommands(); const resetTypingRef = useMouseMoveTypingReset(); const clearerRef = useBlockSelectionClearer(); const localRef = useRef(); diff --git a/packages/edit-post/src/components/layout/index.js b/packages/edit-post/src/components/layout/index.js index ee49801d40ad6..c17a16d11c81b 100644 --- a/packages/edit-post/src/components/layout/index.js +++ b/packages/edit-post/src/components/layout/index.js @@ -20,7 +20,6 @@ import { } from '@wordpress/editor'; import { useSelect, useDispatch } from '@wordpress/data'; import { - useBlockCommands, BlockBreadcrumb, BlockToolbar, privateApis as blockEditorPrivateApis, @@ -134,7 +133,6 @@ function useEditorStyles() { function Layout( { initialPost } ) { useCommands(); useCommonCommands(); - useBlockCommands(); const isMobileViewport = useViewportMatch( 'medium', '<' ); const isHugeViewport = useViewportMatch( 'huge', '>=' ); diff --git a/packages/edit-site/src/components/layout/index.js b/packages/edit-site/src/components/layout/index.js index 65dfb71949a7f..fcb0a74b0b3b8 100644 --- a/packages/edit-site/src/components/layout/index.js +++ b/packages/edit-site/src/components/layout/index.js @@ -28,7 +28,6 @@ import { import { store as preferencesStore } from '@wordpress/preferences'; import { privateApis as blockEditorPrivateApis, - useBlockCommands, store as blockEditorStore, } from '@wordpress/block-editor'; import { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands'; @@ -66,7 +65,6 @@ export default function Layout() { useCommands(); useEditModeCommands(); useCommonCommands(); - useBlockCommands(); const isMobileViewport = useViewportMatch( 'medium', '<' );