function my_mce_settings( $settings ) {
 
  //limit TinyMCE text colors to have only predifined custom colors available
  $custom_colors = '"43a9cf", "Blue", "dfa10d", "Orange", "be7bd2", "Purple"';    
  $settings['textcolor_map'] = '['.$custom_colors.']';
 
  return $settings;
}
add_filter('tiny_mce_before_init', 'my_mce_settings');
Limit TinyMCE text colors
Tagged on:

Leave a Reply

Your email address will not be published. Required fields are marked *