Adding rich text editor to my plugin
-
Hello WordPress users,
I’m trying to add a rich text editor to my own plugin.
So I googled it first of course and I found serveral answers like:
https://www.dev4press.com/2010/tutorials/wordpress/tips/add-rich-text-editor-to-your-plugin/
https://stackoverflow.com/questions/10377496/add-rich-text-editor-in-wp-pluginThis code displays nothing so I tried finding a another solution:
https://www.ads-software.com/support/topic/adding-rich-text-editing-to-your-plugin?replies=15
This displays a rich text edtior like :
https://oi35.tinypic.com/mwcsug.jpgThis seems to work fine, but as soon I switch to the WYSIWYG tab the text I inserted is deleted, I only see a blanco field and I can’t type anything.
Is someone familiair with this problem?
Is this a bug or what can I do to make it work?FYI these scripts and styles are included in my plugin:
function highlights_style() { wp_enqueue_style('thickbox'); } function highlights_script() { wp_register_script( 'jquery.js', HIGHLIGHTS_PLUGIN_URL . 'jquery.js', array('jquery','media-upload','thickbox')); wp_enqueue_script( 'jquery.js' ); wp_enqueue_script('media-upload'); wp_enqueue_script('thickbox'); wp_enqueue_script( 'editor' ); wp_enqueue_media(); add_action( 'admin_head', 'wp_tiny_mce' ); }
And I use this to display the editor:
the_editor( '' , 'content' );
I hope someone can help me!
Thanks!
- The topic ‘Adding rich text editor to my plugin’ is closed to new replies.