Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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