在Wordpress wp_editor中包含TinyMCE插件吗? [英] Include TinyMCE plugins with Wordpress wp_editor?

查看:100
本文介绍了在Wordpress wp_editor中包含TinyMCE插件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前正在为WordPress编写插件,其中包括适用于WordPress内置编辑器的TinyMCE插件.

Currently writing a plugin for WordPress, this includes a TinyMCE plugin for the builtin editor of WordPress.

但是,当我在自定义管理页面上使用以下命令打印TinyMCE编辑器时:

However, when I print a TinyMCE editor at a custom admin page with:

wp_editor( $content, $editor_id, $settings );

编辑器不附带上述插件.我将如何将它们包含在wp_editor中?

The editor does not come with the aforementioned plugins. How would I go about including them with wp_editor?

谢谢.

推荐答案

这只是我的愚蠢.在添加TinyMCE插件之前,我创建了WordPress菜单.

This was just me being stupid. I created the WordPress menu BEFORE adding the TinyMCE plugin..

因此,对于其他人愚蠢地卡在某些东西上,请确保您有

So for other people getting stuck on something this silly, make sure you have

add_filter("mce_external_plugins", array( $this, 'add_tinymce_plugin' ) );
add_filter('mce_buttons', array( $this, 'register_my_tc_button' ) );
// Rest of the code for adding your TinyMCE Plugins
// ...

开始扔东西之前

wp_editor()

期望它能正常工作!

这篇关于在Wordpress wp_editor中包含TinyMCE插件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆