Load font assets dynamically in the editor's iframe when the global settings are modified #51764
Closed
Description
Description
If you update the theme JSON data modified client side using useGlobalSettings
hook in the editor's Iframe without reloading the page, the font presets are loaded on the editor's iframe correctly, but the assets linked in the font presets are not. If I reload the page, the assets added client side are loaded as expected. /
I think the font assets should be automatically loaded if you update the settings.
Step-by-step reproduction instructions
- add font families to
typography.fontFamilies
global settings using theuseGlobalSettings
hook. - Observe that the new font families assets are not loaded in the editor iframe.
- Reload the page and observe that now the font assets are loaded in the iframe.
Screenshots, screen recording, code snippet
No response
Environment info
- Gutenberg trunk
- WordPress 6.2
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes