Support » Plugin: Fonts Plugin | Google Fonts Typography » Font Preview not Working for Full Site Editing

  • Resolved Thiago Loureiro

    (@tloureiro)


    In the current version you cannot preview the font of Google Font block in the Full Site Editor – this probably happens because the editor is inside an iframe (and the regular block editor for posts and pages is not) – because of this the font is appended in the wrong place, in the parent document and not in the iframe.

    My suggestion is, inside addGoogleFontToHead function, try to detect the Full Site Editor iframe first and if not found, append the styles to document.
    Something like:
    const head = document.querySelector('[name=editor-canvas]')?.contentDocument.head || document.head;

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.