首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >WP编辑器在WordPress中的前端不起作用

WP编辑器在WordPress中的前端不起作用
EN

Stack Overflow用户
提问于 2016-04-15 17:24:57
回答 2查看 1.6K关注 0票数 1

我正在尝试在前端嵌入wp编辑器,但它不工作后更新WordPress 4.5,最新版本,

代码语言:javascript
运行
复制
$settings = array(
    'wpautop' => true,
    'postContent' => 'content',
    'media_buttons' => false,
    'tinymce' => array(
    'theme_advanced_buttons1' => 'bold,italic,underline,blockquote,separator,strikethrough,bullist,numlist,justifyleft,justifycenter,justifyright,undo,redo,link,unlink,fullscreen',

    'theme_advanced_buttons2' => 'pastetext,pasteword,removeformat,|,charmap,|,outdent,indent,|,undo,redo',

    'theme_advanced_buttons3' => '',

    'theme_advanced_buttons4' => ''
    ),

    'quicktags' => array(
        'buttons' => 'b,i,ul,ol,li,link,close'
    )
);
wp_editor( $postContent, 'postContent', $settings );

输出备注。

EN

回答 2

Stack Overflow用户

发布于 2016-05-10 21:40:11

我在WordPress.org上开始了一张错误罚单,地址是:https://core.trac.wordpress.org/ticket/36802

请在该票证中添加您可能拥有的任何其他信息。

票数 0
EN

Stack Overflow用户

发布于 2016-07-23 02:48:45

我认为你需要在你的设置中定义'textarea_name‘字段,下面是数组函数wp_editor( $content,$editor_id,$settings = wp_editor ())所需的所有设置;

代码语言:javascript
运行
复制
// default settings
$settings = array(
'wpautop' => true, // use wpautop?
'media_buttons' => true, // show insert/upload button(s)
'textarea_name' => $editor_id, // set the textarea name to something different, square brackets [] can be used here
'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
'tabindex' => '',
'editor_css' => '', // intended for extra styles for both visual and HTML editors buttons, needs to include the <style> tags, can use "scoped".
'editor_class' => '', // add extra class(es) to the editor textarea
'teeny' => false, // output the minimal editor config used in Press This
'dfw' => false, // replace the default fullscreen with DFW (supported on the front-end in WordPress 3.4)
'tinymce' => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
);
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36643260

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档