集成Fancybox和tinyMCE问题 [英] integrating Fancybox and tinyMCE problem

查看:52
本文介绍了集成Fancybox和tinyMCE问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将tinyMCE放在Fancybox弹出框中时出现问题 这是代码

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",
            mode: "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

错误:未捕获的异常: [例外...无法在 除以下文件以外的文件 它已创建"代码:"4" nsresult: "0x80530004 (NS_ERROR_DOM_WRONG_DOCUMENT_ERR)" 位置:"

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: ""

推荐答案

看起来像TinyMCE中的错误.我解压缩脚本,它快要死于7687行了(两者if语句的一半抛出错误,在此处换行以提高可读性):

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)


您可能要提交错误报告,请使用编辑,或同时执行两者.我本人还没有使用过TinyMCE,但似乎有很多关于它的大小(膨胀)和错误(大量)的有效抱怨.


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).

这篇关于集成Fancybox和tinyMCE问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆