【问题标题】:Include TinyMCE plugins with Wordpress wp_editor?在 Wordpress wp_editor 中包含 TinyMCE 插件?
【发布时间】:2016-01-21 14:54:09
【问题描述】:

目前正在为 WordPress 编写一个插件,其中包括一个用于 WordPress 内置编辑器的 TinyMCE 插件。

但是,当我在自定义管理页面上打印 TinyMCE 编辑器时:

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

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

谢谢。

【问题讨论】:

标签: php wordpress plugins tinymce


【解决方案1】:

这只是我愚蠢。我在添加 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()

期待它的工作!

【讨论】:

  • 这对我不起作用。 add_tinymce_plugin 和 register_my_tc_button 的功能是什么? WordPress 应该已经拥有这些功能,就像它们在帖子页面上所做的那样?
猜你喜欢
  • 2016-04-08
  • 2013-12-18
  • 2014-06-29
  • 2011-02-20
  • 2015-04-17
  • 1970-01-01
  • 1970-01-01
  • 2013-08-30
  • 2011-09-07
相关资源
最近更新 更多