WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've created my own WP 3.2 plugin. Now I want to put the WYSIWYG editor in it. I've tried the following code:

<?php the_editor(null, 'body', null, false); ?>

Then it's displayed. I don't know why, but the CSS doesn't look as it should look. Am I missing something? Should I include any CSS file?!

weird tinymce

Please look at the HTML/Visual buttons and the size of the content area.

share|improve this question

Look how I did it in my Meta Box Class:

$editor_settings =  array (
    'textarea_rows' => 8
,   'media_buttons' => FALSE
,   'teeny'         => TRUE
,   'tinymce'       => FALSE
    // a very minimal setup
,   'quicktags'     => array ( 'buttons' => 'strong,em,link' )
wp_editor( $content, $key, $editor_settings );
  • $content is the already saved content you want to show in the editor.
  • $key is the editor ID, it is used for the markup.
  • For possible settings see wp-includes/class-wp-editor.php and the rather short Codex page.

Visual output:

enter image description here

You shouldn’t need a separate CSS file.

share|improve this answer

I recommend you the following article: Using the TinyMCE WYSIWYG editor in your WordPress plugin

share|improve this answer

Your Answer


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.