Support » Plugin: TinyMCE Advanced » font-size select not in pt

  • i found this code to change the default font-size select from pt to px.

    add the following code in your functions.php file.

    // Add custom text sizes in the font size drop down list of the rich text editor (TinyMCE) in WordPress
    // $initArray is a variable of type array that contains all default TinyMCE parameters.
    // Value ‘theme_advanced_font_sizes’ needs to be added, if an overwrite to the default font sizes in the list, is needed.

    function customize_text_sizes($initArray){
       $initArray['theme_advanced_font_sizes'] = "10px,11px,12px,13px,14px,15px,16px,17px,18px,19px,20px,21px,22px,23px,24px,25px,26px,27px,28px,29px,30px,32px,48px";
       return $initArray;
    // Assigns customize_text_sizes() to "tiny_mce_before_init" filter
    add_filter('tiny_mce_before_init', 'customize_text_sizes');

    hope this will be useful..

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘font-size select not in pt’ is closed to new replies.