最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

tinymce - Add table controls with wp_editor minimal editor configuration ('teeny')

programmeradmin0浏览0评论

I want to add the table controls for wp_editor(tinymce) initiated with teeny=>true. Here is what I have done so far (without success):

<?php
$tinymce_options = array('plugins' => "table", 'theme_advanced_buttons2' => "tablecontrols");
$editor_config= array('teeny'=>true, 'textarea_rows'=>5, 'editor_class'=>'csec_text', 'textarea_name'=>'csec_text', 'wpautop'=>false, 'tinymce'=>$tinymce_options);
wp_editor($content, $id, $editor_config);
?>

Can anyone suggest anything reagrding this? Thanks in advance.

I'm using:

Wordpress 5.1.1 + TinyMCE advanced 5.1.0

Current output (with requirement):

I want to add the table controls for wp_editor(tinymce) initiated with teeny=>true. Here is what I have done so far (without success):

<?php
$tinymce_options = array('plugins' => "table", 'theme_advanced_buttons2' => "tablecontrols");
$editor_config= array('teeny'=>true, 'textarea_rows'=>5, 'editor_class'=>'csec_text', 'textarea_name'=>'csec_text', 'wpautop'=>false, 'tinymce'=>$tinymce_options);
wp_editor($content, $id, $editor_config);
?>

Can anyone suggest anything reagrding this? Thanks in advance.

I'm using:

Wordpress 5.1.1 + TinyMCE advanced 5.1.0

Current output (with requirement):

Share Improve this question asked Apr 23, 2019 at 14:57 sariDonsariDon 2651 gold badge2 silver badges18 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

Finally got it running with few pieces of extra buttons too :):

<?php
$tinymce_options = array('plugins' => "table,lists,link,textcolor,hr", 'toolbar1'=>"fontsizeselect,forecolor,backcolor,bold,italic,underline,strikethrough,alignleft,aligncenter,alignright,alignjustify",'toolbar2'=>"blockquote,hr,table,bullist,numlist,undo,redo,link,unlink");
$editor_config= array('teeny'=>true, 'textarea_rows'=>5, 'editor_class'=>'csec_text', 'textarea_name'=>'csec_text', 'wpautop'=>false, 'tinymce'=>$tinymce_options);
wp_editor($content, $id, $editor_config);
?>

Check: wp_editor in add_meta_boxes does not show gallery for better option working in accordance with Wordpress.

发布评论

评论列表(0)

  1. 暂无评论