Michael Schinis
Michael Schinis

Reputation: 697

tinyMCE problem with jQuery load


Iv been searching for a couple of days for this but i can't find a solution. Here is my problem:
I downloaded TinyMCE jquery plugin from their website, uploaded the files to my server.

I want to display TinyMCE after loading a page, using jQuery.load("HTMLFILE")

Here is the code i use to initialize TinyMCE:

$(this).load("pages/addnew-page.php", {areyouhere: "true"}, function(){
        $(this).show("blind", 500);
        $('textarea.tinymce').tinymce({
//tinyMCE Config
            });
});

and then in addnew-page.php, i use:

<textarea class="tinymce">this is a text area</textarea>

First time TinyMCE is launched, it works perfectly, but if i go to another page using .load(), i get a bung of exceptions:

uncaught exception: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDOMHTMLDocument.implementation]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js :: <TOP_LEVEL> :: line 16" data: no]

I have no idea what this causes it. Does anyone know?

Upvotes: 1

Views: 3151

Answers (1)

Thariama
Thariama

Reputation: 50832

I suggest you don't use the jquery build of tinymce (which is surprisingly slow when handling keyboard input). But instead use the regular jQuery lib + the regular tinymce build.

Upvotes: 1

Related Questions