Skip to content

Commit

Permalink
Creator: Use Twenty Twenty-One styles in editor (#417)
Browse files Browse the repository at this point in the history
* Add Twenty Twenty-One styles to the editor to match frontend display

* Add some extra space in the post content
  • Loading branch information
ryelle authored Mar 1, 2022
1 parent 5f8a9ee commit 8a54a63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ export default function BlockEditor( { setIsInserterOpen } ) {
const ref = useMouseMoveTypingReset();
const contentRef = useRef();
const mergedRefs = useMergeRefs( [ contentRef, useTypingObserver() ] );
if ( -1 === settings.__unstableResolvedAssets.styles.indexOf( 'theme-styles' ) ) {
settings.__unstableResolvedAssets.styles +=
'\n<link rel="stylesheet" id="theme-styles" href="https://wp-themes.com/wp-content/themes/twentytwentyone/style.css" media="all" />';
settings.__unstableResolvedAssets.styles +=
'\n<style>body.editor-styles-wrapper { background-color: white; }</style>';
}

return (
<BlockEditorProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ html {
display: block;
width: 100%;
height: 100%;
padding-top: 32px;
background-color: $white;
}
}
Expand Down

0 comments on commit 8a54a63

Please sign in to comment.