1

TinyMCE has a core plugin called Advanced List Plugin that turns the bulleted and numbered list buttons into dropdowns with different list styles. I'm trying to add this plugin using tiny_mce_before_init like so:

function my_format_TinyMCE( $in ) {
    $in['plugins'] .= ',advlist';
    return $in;
}
add_filter( 'tiny_mce_before_init', 'my_format_TinyMCE' );

With this code, the default list buttons don't show up, but the Advanced List buttons don't show up either. There aren't any plugin download links on TinyMCE's site, so I'm assuming the core plugins are autoloaded. I've tried everything I can think of, but can't get this plugin to work.

1

Sorry to answer my own question, but of course I figured it out right after posting this. Instead of tiny_mce_before_init I needed to use mce_external_plugins. Also, I had to download TinyMCE from their website and copy the plugins/advlist folder to WordPress. I created a folder called mce in my WordPress plugins directory and pasted the advlist folder into there.

function my_mce_external_plugins( $plugin_array ) {
    $plugin_array['advlist'] = plugins_url() . '/mce/advlist/plugin.min.js';
    return $plugin_array;
}
add_filter( 'mce_external_plugins', 'my_mce_external_plugins' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.