如果开启WordPress隐藏的编辑器功能就够你用了,何必安装插件呢。
如何开启隐藏的编辑器功能
WordPress默认不支持TinyMCE的全部功能,但它支持的功能也没有全部开启,将下面的代码放到主题的functions.php中,就可以开启全部隐藏功能了。
function add_mce_buttons_1($buttons) {
$buttons = array('newdocument','undo','redo','|','bold','italic','underline','strikethrough','|','justifyleft','justifycenter','justifyright','justifyfull','|','styleselect','formatselect','fontselect','fontsizeselect','wp_more','wp_adv');
return $buttons;
}
function add_mce_buttons_2($buttons) {
$buttons = array('cut','copy','paste','pastetext','pasteword','|','search','replace','|','bullist','numlist','|','outdent','indent','blockquote','|','|','link','unlink','anchor','image','cleanup','code','|','forecolor','backcolor','hr','removeformat','visualaid','|','sub','sup','|','spellchecker','charmap','fullscreen','wp_help');
return $buttons;
}
add_filter("mce_buttons", "add_mce_buttons_1");
add_filter("mce_buttons_2", "add_mce_buttons_2");
效果如下图所示