在 Wordpress wp_editor 中包含 TinyMCE 插件?
Include TinyMCE plugins with Wordpress wp_editor?
目前正在为 WordPress 编写插件,其中包括用于 WordPress 内置编辑器的 TinyMCE 插件。
但是,当我在自定义管理页面打印 TinyMCE 编辑器时:
wp_editor( $content, $editor_id, $settings );
编辑器没有附带上述插件。我将如何将它们包含在 wp_editor 中?
谢谢。
这只是我愚蠢。我在添加 TinyMCE 插件之前创建了 WordPress 菜单..
所以对于其他人卡在这种愚蠢的事情上,确保你有
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 编写插件,其中包括用于 WordPress 内置编辑器的 TinyMCE 插件。
但是,当我在自定义管理页面打印 TinyMCE 编辑器时:
wp_editor( $content, $editor_id, $settings );
编辑器没有附带上述插件。我将如何将它们包含在 wp_editor 中?
谢谢。
这只是我愚蠢。我在添加 TinyMCE 插件之前创建了 WordPress 菜单..
所以对于其他人卡在这种愚蠢的事情上,确保你有
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()
期待它的工作!