wp_editor in text mode only(without TinyMCE)

Is there a way to call wp_editor for a meta box using just the text/HTML mode without TinyMCE. I think the deprecated function pre-3.3 did this but I’m not sure how its done now.

Related posts

Leave a Reply

1 comment

  1. Yes, it’s possible to set it to false. The full parameters list is in the file wp-includes/class-wp-editor.php.

    These are the default values for the $settings array when calling wp_editor( $content, $editor_id, $settings );:

    array(
        'wpautop' => true,
        'media_buttons' => true,
        'textarea_name' => $editor_id,
        'textarea_rows' => 20,
        'tabindex' => '',
        'tabfocus_elements' => ':prev,:next', 
        'editor_css' => '', 
        'editor_class' => '',
        'teeny' => false,
        'dfw' => false,
        'tinymce' => false, // <-----
        'quicktags' => true
    );
    

    Check the source code for details of each parameter. I’ve just made a small test with a meta box and works ok.