krista-m
8/2/2018 - 1:53 PM

Add custom fonts to list with TinyMCE Advanced

Add custom theme fonts to the page and post editor using the TinyMCE Advanced plugin

// Add custom Fonts to the Fonts list
add_filter( 'tiny_mce_before_init', 'register_tinymce_fonts' );
function register_tinymce_fonts( $initArray ) {

    $initArray['font_formats'] = 'Font Name=Font Name;Font Name=Font Name;';

    return $initArray;

}