2

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

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.