I want to implement TinyMCE in my WordPress plugin. HOW?

Basically need the default WordPress TinyMCE WYSIWYG editor where the user will enter some formatted text in my plugin. How do I integrate/implement TinyMCE in a simple HTML WordPress form??

I’m using WordPress v2.9!

Related posts

Leave a Reply

1 comment

  1. The function you are looking for is wp_tiny_mce. Here is how to include the editor in one of your plugin’s admin panel.

    1. Include this code in the admin_head hook

      add_filter('admin_head','zd_multilang_tinymce');
      
      function zd_multilang_tinymce() {
          wp_admin_css('thickbox');
          wp_print_scripts('jquery-ui-core');
          wp_print_scripts('jquery-ui-tabs');
          wp_print_scripts('post');
          wp_print_scripts('editor');
          add_thickbox();
          wp_print_scripts('media-upload');
          if (function_exists('wp_tiny_mce')) wp_tiny_mce();
          // use the if condition because this function doesn't exist in version prior to 2.7
      }
      
    2. Call the editor anywhere you need it to be displayed

      the_editor($content_to_load);
      

    Source