php - Custom wysiwyg ACF

I hope you all are having a great day. I am here for a question that I can not find and answer. And I hope you guys can help me out.
I am using Wordpress with ACF Pro and I am making a custom wysiwyg but I want to know if is possible to have two custom select styles
$toolbars['Special'][1] = array('formatselect', 'bold' , 'bullist', 'link', 'styleselect');
As you see I am calling the 'styleselect' from a Array that is setted down
function my_mce_buttons_2( $buttons ) {
array_unshift( $buttons, 'styleselect' );
return $buttons;
}
function fb_mce_before_init( $settings ) {
$style_formats = array(
array(
'title' => 'H2 Colors',
'items' => array(
array(
'title' => 'Red',
'selector' => 'h2',
'classes' => 'wysiwyg__font-color--primary',
),
array(
'title' => 'Blue',
'selector' => 'h2',
'classes' => 'wysiwyg__font-color--secondary',
),
array(
'title' => 'Black',
'selector' => 'h2',
'classes' => 'wysiwyg__font-color--tertiary',
),
)
),
array(
'title' => 'H5 Colors',
'items' => array(
array(
'title' => 'Red',
'selector' => 'h5',
'classes' => 'wysiwyg__font-color--primary',
),
array(
'title' => 'Black',
'selector' => 'h5',
'classes' => 'wysiwyg__font-color--tertiary',
),
)
),
And I want to know if is possible to create two selectstyles so I can assign it to different pages if it is needed.
I hope you guys understand my question and If you do not understand please let me know so I can fix my post.
Thanks.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: warning: undefined array key
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.