WordPress Tricks

Add additional font size in WordPress Visual Editor ( Tiny MCE Editor)

The Default font which shows in Visual Editor font size dropdown is 8px 10px 12px 14px 16px 20px 24px 28px 32px 36px 48px 60px 72px 96px.

So there is a large gap between font size, so if you want to add additional font size, use the following code in function.php

function add_font_size( $initArray ){
    $initArray['fontsize_formats'] = "8px 10px 12px 14px 16px 20px 24px 26px 28px 32px 36px 48px 60px 72px 96px";
    return $initArray;
  }
add_filter( 'tiny_mce_before_init', 'add_font_size' );
	

Thanks to ScanWP for the nice post.

If you have any issue feel free to do comments or mail me at prakash02cuet@gmail.com or skype me at om2000_cuet

Leave a comment