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

  1. stephenmahood
    Posted 1 year ago #


    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.




  2. Andrew Ozz
    WordPress Dev
    Plugin Author

    Posted 1 year 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 :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TinyMCE Advanced
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic