I'm writing a WordPress plug-in that requres user input, so I thought I'd try and use the default WordPress rich-text-editor. Firstly so as not to have to include a text editor in my plug-in when WordPress already has one, and secondly so it's more seamless for the user.
I literally just want the default editor, nothing changed or customised about it.
The problem is, I can't get it to work without errors, and there is little to no documentation on the the_editor()
function.
At the moment I have this where my textbox should be:
<?php
the_editor( $content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2 );
?>
And the editor appears, but with errors. For example the Visual/HTML looks broken, and the media buttons do nothing. I mean, you click them and nothing happens.
the_editor( $content, 'content', 'title', true, 2 );
-- so long as$content
is defined.