With the introductions of TinyMCE 4.0 comes a new, nice Format Select which has a few categories:
Headers
- Header 1 through Header 6
Inline
- Bold through Code
Blocks
- Paragraph through Pre
Alignment
- Left through Justify
What I want to do is add a Classes Menu at the bottom (below the Alignment menu) which I can stack classes in the submenu. If I use the old fashion method:
$style_formats = array(
array(
'title' => '.large',
'block' => 'p',
'classes' => 'large',
'wrapper' => false,
)
);
$in['style_formats'] = json_encode( $style_formats );
The above will override everything inside my formats
menu. If I print out the variable $in
- style_formats
doesn't exist - formats
on the otherhand does exist, but as a string. I tried to json_decode it but it was no use.
How do I add a "Classes" menu appeneded to the pre-existing formats?