• Does anyone know how to add CSS styles to the TinyMCE

    I have a file in a mu-plugin where I can add styles with this code:

    add_action('admin_head', 'cm_styles');
    add_action('login_head', 'cm_styles');
    add_action('customize_controls_print_scripts', 'cm_styles');
    function cm_styles() {
       echo '<style type="text/css">
    /* custom styles */
    	</style>';
    }

    I can style anything in the admin/login/ pages and the top toolbar. I have tried to add every type of hook I could find relating to the mce editor to add to the above code such as:

    add_filter( 'mce_css', 'cm_styles' );

    but I can’t get it to work.

    Any help appreciated

  • The topic ‘How to add css to the TinyMCE editor’ is closed to new replies.