Home / Forums / DynamiX Support / Add custom styles to TinyMCE editor

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts

  • Jason
    Participant

    Hi Guys,

    I’m trying to add some custom stylings to the TinyMCE editor drop down box as described in this tutorial.

    I tried adding filter the code to functions.php (as describer in method 2). However, I have noticed the Dynamix theme is already calling this filter (sub-functions.php) and adding its custom styles which blocks the additional styles.

    Is there a clean way to add to the styles dropdown without modifying the theme code (future proof)?

    Thanks in advance! 🙂

    Jason


    Jason
    Participant

    I think I’ve found the way:


    // Remove the default Dynamix MCE Styles filter
    function remove_Dynamix_MCE_styles() {
    remove_filter( 'tiny_mce_before_init', 'tuts_mce_before_init' );
    }
    // Call 'remove_Dynamix_MCE_styles' (above) during WP initialization
    add_action('init','remove_Dynamix_MCE_styles');

    And then add my own custom style filters 🙂


    Tom ( Support)
    Keymaster

    Hi,

    I cannot see any reason why this shouldn’t work.

    Kind regards,
    Tom


    Jason
    Participant

    Hi Tom,

    Yes it does work, i’m just not sure how to mark this thread as resolved. 🙂

    Thanks

    Jason

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.