2

I'm trying to load external tinymce plugins but no luck so far. I know WordPress offers mce_external_plugins filter but it seems not make any difference.

I have advlist tinymce plugin inside custom path, and instead of adding it directly inside wp-includes/js/tinymce/plugins directory I'd like WordPress to load it in my custom/path/to/advlist/plugin.min.js

I've tested:

function custom_tinymce_plugins($plugins) {
    $plugins['advlist'] = 'custom/path/to/advlist/plugin.min.js';
    return $plugins;
}
add_filter( 'mce_external_plugins', 'custom_tinymce_plugins' );

and:

$customTinymcePlugins = array(
    'advlist' => 'custom/path/to/advlist/plugin.min.js',
);
apply_filters('mce_external_plugins', $customTinymcePlugins);

I guess I'm missing something important here but for some reason I can't figure out by myself what it is.

I'm 100% sure that the given URL is correct and the file exist.

  • is it for your custom wp_editor or the exists one in wp? – Jevuska Jun 13 '17 at 13:05

Your Answer

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

Browse other questions tagged or ask your own question.