确保为Wordpress加载TinyMCE(用于元框)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了确保为Wordpress加载TinyMCE(用于元框)相关的知识,希望对你有一定的参考价值。
If you are creating a custom post type in Wordpress, and turn off the 'editor' capability, then TinyMCE is not loaded. This means any WYSIWYG meta box textareas will fail. Add this snippet to your theme's functions.php file to load the required TinyMCE JS and styles.
/** * Ensure TinyMCE is loaded. * Required to use TinyMCE in meta boxes. */ add_action("admin_head","myplugin_load_tiny_mce"); function myplugin_load_tiny_mce() { wp_tiny_mce( false ); // true gives you a stripped down version of the editor }
以上是关于确保为Wordpress加载TinyMCE(用于元框)的主要内容,如果未能解决你的问题,请参考以下文章
tinyMCE.editors[] wordpress 4.8 未定义