wordpress自带的文本编辑器功能一般有限,无法设置字体大小,这个很鸡肋。
将以下代码加入到主题的functions.php里即可:
function MBT_add_editor_buttons($buttons) { $buttons[] = 'fontselect'; $buttons[] = 'fontsizeselect'; $buttons[] = 'cleanup'; $buttons[] = 'styleselect'; $buttons[] = 'del'; $buttons[] = 'sub'; $buttons[] = 'sup'; $buttons[] = 'copy'; $buttons[] = 'paste'; $buttons[] = 'cut'; $buttons[] = 'image'; $buttons[] = 'anchor'; $buttons[] = 'backcolor'; $buttons[] = 'wp_page'; $buttons[] = 'charmap'; return $buttons; } add_filter("mce_buttons_2", "MBT_add_editor_buttons");
或者直接使用插件也行,插件免费下载:
0 个评论