Hi,
I used in function.php a code to custom default colors in editor. It’s work perfectly with standard wordpress editor but with Siteorigin editor, the colors are not display. After personal investigation, I find the problem in the variable type used for $init[‘textcolor_map’]. WordPress want a string and Siteorigin want an array.
So, have you a solution which work for WordPress and SiteOrigin Editors ?
Work with standard wordpress editor not Siteorigin editor:
function maxitabs_mce4_options($init) {
$default_colours = ‘”000000″, “Black”,
“993300”, “Burnt orange”,
“333300”, “Dark olive”,
“003300”, “Dark green”‘;
$init[‘textcolor_map’] = ‘[‘.$default_colours.’]’;
$init[‘textcolor_rows’] = 6;
$init[‘textcolor_cols’] = 8;
return $init;
}
add_filter(‘tiny_mce_before_init’, ‘maxitabs_mce4_options’);
Work with Siteorigin editor not with standard wordpress editor:
function maxitabs_mce4_options($init) {
$default_colours = array(“000000”, “Black”,
“993300”, “Burnt orange”,
“333300”, “Dark olive”,
“003300”, “Dark green”);
$init[‘textcolor_map’] = $default_colours;
$init[‘textcolor_rows’] = 6;
$init[‘textcolor_cols’] = 8;
return $init;
}
add_filter(‘tiny_mce_before_init’, ‘maxitabs_mce4_options’);
Thank you
Hi Mike,
I’m going to bring this up with the development team – sorry about this.
Hi Mike,
Please try:
Hi Alex,
Well I try your code and it’s work ! But if I want add more rows (to add more colors) with
Siteorigin Builder does not show any colors (but WordPress yes).
After personal investigation, I founded the solution with Siteorigin Builder it’s necessary to put the code
before
So now with your help (and dev team) it’s work !! thank you
Michael