Custom color palette for the tinyMCE editor
-
Hi,
As I have mentioned in the title I want to set up a custom color palette for the tinyMCE-Editor used by the newsletter-plugin. On WordPress itself I have set up this using a hook. But I couldn’t find a hook for this editor and I don’t want to alter the plugin code, because then I had to made the changes after each update. So this isn’t an option for me.
This is the code I used for WordPress:
function my_custom_tinymce($init) { $default_colours = '"990000", "H6 rot", "1C5288", "h3 blau", "ffff00","Marker"'; $init['toolbar2'] = str_replace("forecolor,","forecolor,backcolor,",$init['toolbar2']); $init['toolbar1'] = str_replace('wp_more,','wp_more,charmap,',$init['toolbar1']); $init['textcolor_map'] = '['.$default_colours.']'; // enable 6th row for custom colours in grid $init['textcolor_rows'] = 6; return $init; } add_filter('tiny_mce_before_init', 'my_custom_tinymce');
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom color palette for the tinyMCE editor’ is closed to new replies.