开发者

integrating Fancybox and tinyMCE problem

开发者 https://www.devze.com 2023-02-27 23:42 出处:网络
I have a problem when put tinyMCE in Fancybox popup box Here is the code $(document).ready(function() {

I have a problem when put tinyMCE in Fancybox popup box Here is the code

$(document).ready(function() {


        $(".reply_button").fancybox({
        'scrolling'     : 'no',
        'titleShow'     : false,
        'onClosed'      : function() {
           $.fancybox.close();
            $("#login_error").hide();
        }
        ,'onComplete': function(){
              $("textarea.editor").tinymce({
            script_url: "resources/scripts/tiny_mce",
            m开发者_如何转开发ode: "textareas",
            theme: "advanced",

        });
        }
    });

    });

The problem is when the box opened then I close it , the grey layer that covered the page stay and i have to refresh the page to get back to the website .

and I have this error trace in the console

Error: uncaught exception: [Exception... "Node cannot be used in a document other than the one in which it was created" code: "4" nsresult: "0x80530004 (NS_ERROR_DOM_WRONG_DOCUMENT_ERR)" location: ""


Looks like a bug in TinyMCE. I unpacked the script and it's dying on line 7687 (both halves of the ifstatement throw the error, line wrapped here for readability):

if (i.compareBoundaryPoints(i.START_TO_START, g.selectedRange) === 0 && 
    i.compareBoundaryPoints(i.END_TO_END, g.selectedRange) === 0)

You might want to file a bug report, use a different editor, or do both. I haven't used TinyMCE myself but there seem to be a number of valid complaints about its size (bloated) and bugs (numerous).

0

精彩评论

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