[Resolved] change the colors of TyniMCE

Home Forums Support [Resolved] change the colors of TyniMCE

Home Forums Support change the colors of TyniMCE

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #369951
    Luis

    Good afternoon,

    How can I change the colors of TyniMCE? What Hooks should I use?

    I want to use the function “my_mce_settings” and then “add_filter (‘tiny_mce_before_init’, ‘my_mce_settings’); But I do not know what hooks I have to use of the many there are!

    Thank you very much!

    #370018
    Leo
    Staff
    Customer Support

    Hi there,

    I think wp_head hook should work: https://docs.generatepress.com/article/wp-head/

    #370299
    Luis

    Hello,

    My code is:

    function my_mce_settings( $settings ) {

    //limita los colores de texto en TinyMCE para sólo tener algunos colores predefinidos
    $custom_colors = ‘”43a9cf”, “Azul”, “dfa10d”, “Naranja”, “be7bd2”, “Violeta”‘;
    $settings[‘textcolor_map’] = ‘[‘.$custom_colors.’]’;

    return $settings;
    }
    add_filter(‘tiny_mce_before_init’, ‘my_mce_settings’);

    And it does not work in wp_head

    Thank you very much

    #370441
    Leo
    Staff
    Customer Support

    Ahh try one of these methods instead: https://docs.generatepress.com/article/adding-php/

    #370634
    Luis

    Okay. I used Code Snippets before using GP, but I thought GP Hooks did the same thing.
    okay. Understood, and will continue using Code Snippets.
    Thank you very much for clarifying the subject.

    #370898
    Leo
    Staff
    Customer Support

    No problem!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.