Is there a way to add TinyMCE into my own WordPress plugin?
I have a textarea in my back end script and want to make this area into a TinyMCE WYSIWYG editable field. Is there a way to do that?
This code does not work for me:
<?php
wp_tiny_mce(false,array("editor_selector" => "test"));
?>
<textarea class="test" id="test" name="test"></textarea>
It shows the javascript error
f is undefined
Firebug screenshot:
This didn't work either:
<textarea class="theEditor" id="videogalerie-add_description" name="videogalerie-add_description"></textarea>
Following guides from here and there (found thanks to this), here's how I've managed to make something work on wordpress 3.0.5 :
Tested and working on wordpress 3.3.1
add to functions or plugin file.
for Adding new content..
for editing my content
this will include the entire rage of scripts / css and code needed to produce a tinyMCE textarea within either your plugin or template files..
hope this helps..
M