diff --git a/src/plugins/global-settings/typography/get-theme-styles.js b/src/plugins/global-settings/typography/get-theme-styles.js new file mode 100644 index 000000000..95984ea5c --- /dev/null +++ b/src/plugins/global-settings/typography/get-theme-styles.js @@ -0,0 +1,22 @@ +export const getThemeStyles = () => { + const iframe = document.querySelector( 'iframe[name="editor-canvas"]' ) + let themeStyles = '' + + if ( iframe ) { + const doc = iframe.contentDocument || iframe.contentWindow.document + + // theme styles are stored in { TYPOGRAPHY_TAGS.map( ( { label, selector, help, }, index ) => {