Title: TinyMCE integration on a plugin
Last modified: August 20, 2016

---

# TinyMCE integration on a plugin

 *  [UnPointZero](https://wordpress.org/support/users/unpointzero/)
 * (@unpointzero)
 * [15 years ago](https://wordpress.org/support/topic/tinymce-integration-on-a-plugin/)
 * Hi,
 * I’ve done a small plugin for a website to add some specific content.
    On my plugin
   admin panel, I’m using TinyMCE to display textareas. My problem is that TinyMCE
   doesn’t generate proper HTML code. For exemple, it doesn’t add <p></p> automatically
   and when I underline something, it just add <span> </span> around the text.
 * Here’s my action to load tinymce :
 *     ```
       add_action('admin_print_scripts', 'do_jslibs' );
   
       function do_jslibs()
       {
       	wp_enqueue_script( 'common' );
       	wp_enqueue_script( 'jquery-color' );
       	wp_print_scripts('editor');
       	if (function_exists('add_thickbox')) add_thickbox();
       	wp_print_scripts('media-upload');
       	if (function_exists('wp_tiny_mce')) wp_tiny_mce();
       	wp_admin_css();
       	wp_enqueue_script('utils');
       	do_action("admin_print_styles-post-php");
       	do_action('admin_print_styles');
       }
       ```
   
 * Any ideas ?
 * Thanks !

Viewing 1 replies (of 1 total)

 *  Thread Starter [UnPointZero](https://wordpress.org/support/users/unpointzero/)
 * (@unpointzero)
 * [15 years ago](https://wordpress.org/support/topic/tinymce-integration-on-a-plugin/#post-2101630)
 * Ok problem resolved… it’s not TinyMCE it’s a bug with another function :P.
 * BTW this code works well if you want to use TinyMCE in your plugins !
    the_editor(‘
   your text’,’textarea name’); to display tinymce 🙂
 * C ya!

Viewing 1 replies (of 1 total)

The topic ‘TinyMCE integration on a plugin’ is closed to new replies.

## Tags

 * [tiny-mce](https://wordpress.org/support/topic-tag/tiny-mce/)
 * [tinymce](https://wordpress.org/support/topic-tag/tinymce/)

 * 1 reply
 * 1 participant
 * Last reply from: [UnPointZero](https://wordpress.org/support/users/unpointzero/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/tinymce-integration-on-a-plugin/#post-2101630)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
