【问题标题】:FCKEditor doesn't work in IE10FCKEditor 在 IE10 中不起作用
【发布时间】:2012-11-30 05:25:54
【问题描述】:

FCKEditor 没有出现在 IE10 中。当我去IE开发工具和浏览器模式切换到IE9时,FCKEditor工作正常。但是当我为模拟 IE9 放置元标记时:

<meta http-equiv="X-UA-Compatible" content="IE=9" >

进入我的网页的标题,它对我没有帮助。如何让 FCKEditor 工作?或者还有其他方法可以在 IE10 中模拟 IE9?

【问题讨论】:

  • 有机会升级到CKEditor吗?我认为 FCKEditor 不再维护了。

标签: fckeditor internet-explorer-10


【解决方案1】:

//IE10

fckeditor.js > 方法:FCKeditor_IsCompatibleBrowser

找到这个:

var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ;

替换为:

var sBrowserVersion = navigator.appVersion.match(/MSIE ([\d.]+)/)[1] ;

fckeditorcode_ie.js

找到

e.scopeName!='HTML' 

将条件更改为:

if(FCKBrowserInfo.IsIE&& e.scopeName && e.scopeName!='HTML')

找到

D.parentElement().document!=B 

更改为:

if(D.parentElement().document && D.parentElement().document!=B)

找到

B.open("GET",A,false); 

添加:

B.open("GET",A,false);
try {
    B.responseType = "msxml-document";
} catch(e) {};
B.send(null);

【讨论】:

    【解决方案2】:

    试试这个

    Mozilla 17

    在 fckeditorcode_gecko.js 中

    找到这个>>

    if (A.IsGecko){var B=s.match(/gecko\/(\d+)/)[1];A.IsGecko10=((B<20051111)||(/rv:1\.7/.test(s)));A.IsGecko19=/rv:1\.9/.test(s);}else A.IsGecko10=false;}
    

    并替换为>>

    if (A.IsGecko){var B=s.match(/gecko\/([0-9.]+)/)[1];if(B != "17.0"){A.IsGecko10=((B<20051111)||(/rv:1\.7/.test(s)));}A.IsGecko19=/rv:1\.9/.test(s);}else A.IsGecko19=true;}
    

    在 fckeditor.php 中

    找到这个>>

    return ($iVersion >= 20030210);
    

    并替换为>>

    //return ($iVersion >= 20030210);
    
    return true;
    

    【讨论】:

      【解决方案3】:

      IE10 无法很好地使用它的新怪癖模式。

      您可以切换到他们开发的较旧的基本怪癖模式,您的问题将得到解决。 添加以下元标记:

      <meta http-equiv="X-UA-Compatible" content="IE=5">
      

      还要确保您检测到浏览器及其版本为 IE10,然后应用此元标记。

      【讨论】:

      • 还要确保您检测到浏览器及其版本为 IE10,然后应用此元标记。
      【解决方案4】:

      这对我有帮助:

      &lt;meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" /&gt;

      .

      并在ckeditor JS代码中查找并替换正则表达式:

      /MSIE (\d+)/ 替换为/MSIE ([\d.]+)/


      最重要的是,不要忘记关闭浏览器/标签并再次打开该网站。否则这个元标记将不起作用!

      【讨论】:

        【解决方案5】:

        经过数小时的调试,我的解决方案非常简单。

        我让 fckeditor.js 包含最后一个 javascript 包含。如果它被埋在一堆其他 js 包含之间,它会在 IE 10 中失败。当我将它放到最后一个 javascript 文件中以包含它时。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2013-12-02
          • 2013-11-13
          • 2013-08-29
          • 1970-01-01
          • 1970-01-01
          • 2014-09-02
          • 1970-01-01
          • 2013-08-03
          相关资源
          最近更新 更多