On a recent migration project, one of the requirements was to add a few blockquote styles to the TinyMCE dropdown list to match the editorial process of the old CMS. Wordpress provides a filter to add a secondary or tetriary dropdown, but if you only have a couple additional elements, it seems like bad UX to seperate it from the original dropdown.
Going off a tip from Chancey Mathews, I realized that Wordpress does not send a argument for block_formats
when initializing TinyMCE, thus relying on the defaults. By adding this argument to the tiny_mce_before_init
filter, we can add in our extra elements*:
* Note: since we're overriding the defaults, we need to include the original elements (p, h1-h6..etc)
function mce_formats( $init ) {