Support » Plugins » 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)
  • 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.