I have a custom post type which supports editor. (WordPress version 3.5)

I want to customize the editor for it.

  1. Make it readonly
  2. Hide “Add Media” button
  3. Hide HTML editor
  4. Remove status bar showing word count

I am using the following code:

add_filter( 'tiny_mce_before_init', function( $args ) {
     $args['readonly'] = 1;
     $args['media_buttons'] = 0;
     $args['theme_advanced_disable'] = "code";
     return $args;
});

Only readonly is working. Is it not possible to do other customization using tiny_mce_before_init?

3 s
3

It should be 'media_buttons' => FALSE.

array (
    'textarea_rows' => 5,
    'media_buttons' => FALSE,
    'teeny'         => TRUE,
    'tinymce'       => TRUE
)

… creates this editor:

enter image description here

Leave a Reply

Your email address will not be published. Required fields are marked *