WordPress.org

Ready to get started?Download WordPress

Forums

TinyMCE Advanced
[resolved] Last theme_advanced_fonts not working (2 posts)

  1. stephenmahood
    Member
    Posted 8 months ago #

    Hi,

    I have added a number of font-families using functions.php with the following code:

    function customize_text_sizes($initArray){
       $initArray['theme_advanced_font_sizes'] = "16px, 20px, 25px, 30px, 38px";
       $initArray['theme_advanced_fonts'] = "Light=HelveticaNeueLTStd-Lt;";
       $initArray['theme_advanced_fonts'] .= "Bold=HelveticaNeueLTStd-Bd;";
       $initArray['theme_advanced_fonts'] .= "Roman=HelveticaNeueLTStd-Roman;";
       return $initArray;
    }
    
    add_filter('tiny_mce_before_init', 'customize_text_sizes');

    I am able to see the fonts okay in the drop down for font families and selecting the fonts adds in the span tag. However the last entry in the array never seems to work. The font-family is not added to the span tag.

    Any help resolving this would be great.

    Thanks

    Stephen

    http://wordpress.org/plugins/tinymce-advanced/

  2. Andrew Ozz
    WordPress Dev
    Plugin Author

    Posted 8 months ago #

    If you look carefully at the example in the TinyMCE documentation: http://www.tinymce.com/wiki.php/Configuration3x:theme_advanced_fonts, the last entry doesn't have a semicolon at the end. Remove that and it will work properly :)

Reply

You must log in to post.

About this Plugin

About this Topic