Add custom formats in TinyMCE dropdown button
/**
* Add custom formats in TinyMCE dropdown button
* @param $init_array
* @return mixed
*/
function child_theme_editor_custom_formats($init_array)
{
$style_formats = [
[
'title' => "Puce bleue (liste)",
'selector' => 'ul,li',
'classes' => 'color-BLEUfonce',
'wrapper' => true,
],
[
'title' => "Puce verte (liste)",
'selector' => 'ul,li',
'classes' => 'color-VERT',
'wrapper' => true,
],
];
$init_array['style_formats'] = json_encode($style_formats);
return $init_array;
}