Skip to content

Snippet: Add Custom Font To TinyMCE Editor

/**
 * Add Custom Font To TinyMCE Editor
 * Will not load the font family in the backend, to do this use add_editor_style
 * Will not load the font in the front-end to do this just use @import in your custom CSS location or child theme
 */
function my_wpex_mce_font_formats_array( $fonts ) {
	$fonts[] = 'Crimson Text';
	return $fonts;
}
add_filter( 'wpex_mce_font_formats_array', 'my_wpex_mce_font_formats_array' );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top