Home / Admin / Show local fonts in block editor
Duplicate Snippet

Embed Snippet on Your Site

Show local fonts in block editor

Display custom fonts in the backend editor

Code Preview
php
<?php
add_filter( 'block_editor_settings_all', function( $editor_settings ) {
    $css = wp_get_custom_css_post()->post_content;
    $editor_settings['styles'][] = array( 'css' => $css );
    return $editor_settings;
} );

Comments

Add a Comment