本文介绍了从 wp_editor 禁用一些按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过以下代码行在 Wordpress 的元框中使用 tinyMce 编辑器,我想在使用时删除一些按钮.我不想影响主编辑器.我知道如何删除一些按钮,这是此处介绍的.

I use tinyMce editor in meta boxes of Wordpress by the following line of code, I want to remove some buttons when I use there. I don't want to affect the main editor. I know how to remove some buttons, which is told here.

我的问题是,当我使用 wp_editor 调用编辑器时,是否可以禁用某些按钮(例如更多).我检查了它的手册,参数似乎不支持这一点.

My question is, is it possible to disable some buttons (e.g. more) when I call editor with wp_editor. I checked its manual, arguments doesn't seem to support this.

wp_editor( $careers_settings["description"], "editor", array("media_buttons"=>FALSE,  "textarea_name"=>"description", "textarea_rows"=>5) );

谢谢.

推荐答案

您应该再次查看参考手册 - 可以将 tinymce 作为参数并传递一组配置选项,例如喜欢

You should check the referenced manual again - it's possible to have tinymce as parameter and pass an array of configuration options, e.g. like

wp_editor($value, "input...", array(
    'tinymce' => array( .. //tinymce configuration options here )
     ))

还没试过,但应该可以这样.

Haven't tried it out, but it should work like that.

这篇关于从 wp_editor 禁用一些按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-31 09:52