TinyMCE 4.0 – Add Classes into Format Select
-
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 JustifyWhat 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
formatsmenu. If I print out the variable$in–style_formatsdoesn’t exist –formatson 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?
The topic ‘TinyMCE 4.0 – Add Classes into Format Select’ is closed to new replies.