-
-
-
-
-
+
);
diff --git a/packages/edit-site/src/components/editor/index.js b/packages/edit-site/src/components/editor/index.js
index dc5818e3132c8..6bf6e0751a356 100644
--- a/packages/edit-site/src/components/editor/index.js
+++ b/packages/edit-site/src/components/editor/index.js
@@ -1,13 +1,7 @@
/**
* WordPress dependencies
*/
-import {
- useEffect,
- useState,
- useMemo,
- useCallback,
- useRef,
-} from '@wordpress/element';
+import { useEffect, useState, useMemo, useCallback } from '@wordpress/element';
import { useSelect, useDispatch } from '@wordpress/data';
import {
SlotFillProvider,
@@ -19,8 +13,6 @@ import { EntityProvider } from '@wordpress/core-data';
import {
BlockContextProvider,
BlockBreadcrumb,
- __unstableUseEditorStyles as useEditorStyles,
- __experimentalUseResizeCanvas as useResizeCanvas,
__experimentalLibrary as Library,
} from '@wordpress/block-editor';
import {
@@ -59,7 +51,6 @@ function Editor() {
const {
isFullscreenActive,
isInserterOpen,
- deviceType,
sidebarIsOpened,
settings,
entityId,
@@ -71,7 +62,6 @@ function Editor() {
const {
isFeatureActive,
isInserterOpened,
- __experimentalGetPreviewDeviceType,
getSettings,
getEditedPostType,
getEditedPostId,
@@ -85,7 +75,6 @@ function Editor() {
return {
isInserterOpen: isInserterOpened(),
isFullscreenActive: isFeatureActive( 'fullscreenMode' ),
- deviceType: __experimentalGetPreviewDeviceType(),
sidebarIsOpened: !! select(
interfaceStore
).getActiveComplementaryArea( 'core/edit-site' ),
@@ -115,8 +104,6 @@ function Editor() {
updateEditorSettings( { defaultTemplateTypes } );
}, [ defaultTemplateTypes ] );
- const inlineStyles = useResizeCanvas( deviceType );
-
const [
isEntitiesSavedStatesOpen,
setIsEntitiesSavedStatesOpen,
@@ -163,9 +150,6 @@ function Editor() {
}, [ isNavigationOpen ] );
const isMobile = useViewportMatch( 'medium', '<' );
- const ref = useRef();
-
- useEditorStyles( ref, settings.styles );
const [ inserterDialogRef, inserterDialogProps ] = useDialog( {
onClose: () => setIsInserterOpened( false ),
@@ -200,7 +184,6 @@ function Editor() {
}
secondarySidebar={
@@ -252,12 +235,8 @@ function Editor() {
/>
}
content={
-
+ <>
-
{ template && (
) }
-
+ >
}
actions={
<>
diff --git a/packages/edit-site/src/components/editor/style.scss b/packages/edit-site/src/components/editor/style.scss
index cb8048a51cd5c..b400e93cce2a9 100644
--- a/packages/edit-site/src/components/editor/style.scss
+++ b/packages/edit-site/src/components/editor/style.scss
@@ -22,7 +22,14 @@
.edit-site-visual-editor {
position: relative;
- background-color: $white;
+ height: 100%;
+
+ iframe {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background-color: $white;
+ }
}
.edit-site-editor__inserter-panel {