有办法打电话吗wp_editor
对于只使用文本/HTML模式而不使用TinyMCE的元框。我认为不推荐使用的函数pre-3.3做到了这一点,但我不确定它现在是如何做到的。
仅文本模式下的WP_EDITOR(没有TinyMCE)
1 个回复
最合适的回答,由SO网友:brasofilo 整理而成
是的,可以将其设置为false。完整参数列表在文件中wp-includes/class-wp-editor.php
.
这些是$settings
调用时的数组wp_editor( $content, $editor_id, $settings );
:
array(
\'wpautop\' => true,
\'media_buttons\' => true,
\'textarea_name\' => $editor_id,
\'textarea_rows\' => 20,
\'tabindex\' => \'\',
\'tabfocus_elements\' => \':prev,:next\',
\'editor_css\' => \'\',
\'editor_class\' => \'\',
\'teeny\' => false,
\'dfw\' => false,
\'tinymce\' => false, // <-----
\'quicktags\' => true
);
检查源代码以了解每个参数的详细信息。我刚刚用一个元盒做了一个小测试,效果很好。结束