开发者

tinyMCE problem with jQuery load

开发者 https://www.devze.com 2023-03-16 05:30 出处:网络
Iv been searching for a co开发者_开发知识库uple of days for this but i can\'t find a solution. Here is my problem:

Iv been searching for a co开发者_开发知识库uple 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消