0

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.

1 Answer 1

4

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.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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