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?!
Please look at the HTML/Visual buttons and the size of the content area.
Look how I did it in my Meta Box Class:
$content
is the already saved content you want to show in the editor.$key
is the editor ID, it is used for the markup.wp-includes/class-wp-editor.php
and the rather short Codex page.Visual output:
You shouldnât need a separate CSS file.
I recommend you the following article: Using the TinyMCE WYSIWYG editor in your WordPress plugin