Вопрос

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): enter image description here

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с wordpress.stackexchange
scroll top