Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I added a TinyMCE editor to my plugin settings page, but once I move (drag) the metabox, editor's content get lost. (the TinyMCE editor is completely not editable until refresh)

Here is how I added TinyMCE editor:

add_action( 'admin_head', 'add_tinymce_editor' );

function add_tinymce_editor() {
    if ( function_exists( 'wp_tiny_mce' ) ) {
        add_filter('teeny_mce_before_init', create_function( '$a', '
            $a["mode"] = "textareas";
            $a["editor_selector"] = "";
            $a["plugins"] = "safari,inlinepopups,spellchecker";
            return $a;')
        );

        wp_tiny_mce( true );
    }
}

Any ideas what can cause this bug and how to prevent/fix it?

Thanks.

share|improve this question
add comment

2 Answers 2

up vote 0 down vote accepted

I had a similar problem with radio buttons losing their status when I dragged a metabox on a settings page.

I hacked together a workaround and posted it as a reply to the original wordpress trac ticket http://core.trac.wordpress.org/ticket/16972#comment:4

share|improve this answer
add comment

It seems to be caused by jQuery UI:

http://core.trac.wordpress.org/ticket/16972

share|improve this answer
    
Haha, this is the bug I reported, but I wasn't sure that it is the same with TinyMCE, so currently we can't do anything with that, right? –  depi Mar 28 '11 at 10:18
    
You can try to find a workaround. If you find something, do share. –  scribu Mar 28 '11 at 13:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.