Title: wp_editor() function and tinyMCE buttons
Last modified: August 20, 2016

---

# wp_editor() function and tinyMCE buttons

 *  [nodley](https://wordpress.org/support/users/nodley/)
 * (@nodley)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/wp_editor-function-and-tinymce-buttons/)
 * _Sorry for cross-posting, I accidentally posted in the wrong forum originally._
 * Hi guys,
 * I wish to use the tinyMCE editor within a Meta Box, and it is working brilliantly
   using the wp_editor function.
 * However, I want to only offer a subset of buttons. This is easily achieved in
   quicktags, but I cannot seem to figure our how to do it for tinyMCE.
 * My settings array is below
 *     ```
       $tinyMCE_settings = array(
           "teeny" => true,
           "media_buttons" => false,
           "wpautop" => true,
           "textarea_rows" => 5,
           "quicktags" => array(
               "buttons" => "em,strong,link"
           )
       );
       ```
   
 * There is a filter for mce_buttons, but how can I target a particular tinyMCE 
   instance?
 * Alternatively, can I use a syntax similar to the quicktags option above?

Viewing 1 replies (of 1 total)

 *  [Ciprian](https://wordpress.org/support/users/arrakis83/)
 * (@arrakis83)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/wp_editor-function-and-tinymce-buttons/#post-2654048)
 * Hi,
 * You can use the _teeny\_mce\_buttons_ filter for the buttons and the _editor\
   _id_ parameter to identify a particular tinyMCE instance.
 * For example, to have only the bold, italic and underline buttons for a specific
   instance you can do :
 *     ```
       function mytheme_teeny_mce_buttons( $buttons, $editor_id ) {
       	if ( "my-instance-id" == $editor_id ) {
       	  return array( 'bold', 'italic', 'underline' );
               }
               return $buttons;
       }
       add_filter( 'teeny_mce_buttons', 'mytheme_teeny_mce_buttons', 10, 2 );
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘wp_editor() function and tinyMCE buttons’ is closed to new replies.

## Tags

 * [buttons](https://wordpress.org/support/topic-tag/buttons/)
 * [tinymce](https://wordpress.org/support/topic-tag/tinymce/)
 * [wp_](https://wordpress.org/support/topic-tag/wp_/)

 * 1 reply
 * 2 participants
 * Last reply from: [Ciprian](https://wordpress.org/support/users/arrakis83/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/wp_editor-function-and-tinymce-buttons/#post-2654048)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
