diff --git a/packages/edit-post/src/components/layout/index.js b/packages/edit-post/src/components/layout/index.js
index 15bc017900daa..6f9c510551466 100644
--- a/packages/edit-post/src/components/layout/index.js
+++ b/packages/edit-post/src/components/layout/index.js
@@ -63,7 +63,7 @@ const interfaceLabels = {
footer: __( 'Editor footer' ),
};
-function Layout( { styles } ) {
+function Layout() {
const isMobileViewport = useViewportMatch( 'medium', '<' );
const isHugeViewport = useViewportMatch( 'huge', '>=' );
const isLargeViewport = useViewportMatch( 'large' );
@@ -248,7 +248,7 @@ function Layout( { styles } ) {
) }
{ isRichEditingEnabled && mode === 'visual' && (
-
+
) }
{ ! isDistractionFree && ! isTemplateMode && (
diff --git a/packages/edit-post/src/components/visual-editor/index.js b/packages/edit-post/src/components/visual-editor/index.js
index ec53dc380aace..f8c680c4a1a05 100644
--- a/packages/edit-post/src/components/visual-editor/index.js
+++ b/packages/edit-post/src/components/visual-editor/index.js
@@ -29,6 +29,7 @@ import {
__experimentalRecursionProvider as RecursionProvider,
__experimentaluseLayoutClasses as useLayoutClasses,
__experimentaluseLayoutStyles as useLayoutStyles,
+ privateApis as blockEditorPrivateApis
} from '@wordpress/block-editor';
import { useEffect, useRef, useMemo } from '@wordpress/element';
import { Button, __unstableMotion as motion } from '@wordpress/components';
@@ -43,6 +44,9 @@ import { store as coreStore } from '@wordpress/core-data';
* Internal dependencies
*/
import { store as editPostStore } from '../../store';
+import { unlock } from '../../private-apis';
+
+const { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );
const isGutenbergPlugin = process.env.IS_GUTENBERG_PLUGIN ? true : false;
@@ -104,7 +108,8 @@ function getPostContentAttributes( blocks ) {
}
}
-export default function VisualEditor( { styles } ) {
+export default function VisualEditor( ) {
+ let [ styles, settings, svgFilters ] = useGlobalStylesOutput();
const {
deviceType,
isWelcomeGuideVisible,
@@ -365,6 +370,7 @@ export default function VisualEditor( { styles } ) {
contentRef={ contentRef }
styles={ styles }
>
+ { svgFilters }
{ themeSupportsLayout &&
! themeHasDisabledLayoutStyles &&
! isTemplateMode && (
diff --git a/packages/edit-post/src/editor.js b/packages/edit-post/src/editor.js
index e173d80098b24..e585d51c495eb 100644
--- a/packages/edit-post/src/editor.js
+++ b/packages/edit-post/src/editor.js
@@ -14,6 +14,7 @@ import { SlotFillProvider } from '@wordpress/components';
import { store as coreStore } from '@wordpress/core-data';
import { ShortcutProvider } from '@wordpress/keyboard-shortcuts';
import { store as preferencesStore } from '@wordpress/preferences';
+import { GlobalStylesProvider } from '@wordpress/edit-site';
/**
* Internal dependencies
@@ -176,20 +177,22 @@ function Editor( { postId, postType, settings, initialEdits, ...props } ) {
return (
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
);
diff --git a/packages/edit-site/src/index.js b/packages/edit-site/src/index.js
index d920b02e562ec..ae6eff00f28ac 100644
--- a/packages/edit-site/src/index.js
+++ b/packages/edit-site/src/index.js
@@ -104,3 +104,4 @@ export function reinitializeEditor() {
export { default as PluginSidebar } from './components/sidebar-edit-mode/plugin-sidebar';
export { default as PluginSidebarMoreMenuItem } from './components/header-edit-mode/plugin-sidebar-more-menu-item';
export { default as PluginMoreMenuItem } from './components/header-edit-mode/plugin-more-menu-item';
+export { GlobalStylesProvider } from './components/global-styles/global-styles-provider';