Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Sounds to me like you didn’t empty your browser cache and reload the edit-page after implementing your code and classes…

    I finally did it – just include following code to your functions.php:

    /* Custom CSS styles on TinyMCE Editor */
    
    if ( ! function_exists( 'myCustomTinyMCE' ) ) :
    
    function myCustomTinyMCE($init) {
    
      	$init['theme_advanced_styles'] = 'Ueberschrift=ueberschrift;Foto=foto';  
    
     return $init;
    
    }
    endif;
    
    add_filter('tiny_mce_before_init', 'myCustomTinyMCE' );
    add_filter( 'mce_css', 'tdav_css' );

    This not only removed all predefined classes from the dropdown box, but lets you declare your own classes within the tadv-mce.css file.

    Only drawback: you will have to declare the classes you want to use within the “$init[‘theme_advanced_styles’] = ‘Ueberschrift=ueberschrift;Foto=foto’;” section of the code above. And naturally, your classes should also exist in your default-css for the frontend.

    Also, if you have troubles with Safari/Mac, don’t forget to empty your cache after doing any changes.

Viewing 2 replies - 1 through 2 (of 2 total)