FCKEditor doesn't work in IE10

冷暖自知 提交于 2019-11-30 13:56:46
meexplorer

try this

Mozilla 17

in fckeditorcode_gecko.js

find this>>

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;}

and replace with>>

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;}

in fckeditor.php

find this>>

return ($iVersion >= 20030210);

and replace with>>

//return ($iVersion >= 20030210);

return true;
meexplorer

//IE10

in fckeditor.js > method : FCKeditor_IsCompatibleBrowser

find this:

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

and replace with:

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

in fckeditorcode_ie.js

find

e.scopeName!='HTML' 

and change if condition to:

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

find

D.parentElement().document!=B 

and change if to:

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

find

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

and add this:

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

IE10 is not working well with it's new quirks mode.

You can switch to the older, basic quirks mode they develop and your problem will be solved. Add the following meta tag:

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

Also make sure you detect the browser and and it's version as IE10 and then apply this meta tag.

This is what helped me:

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

.

and find & replace the regex in ckeditor JS codes:

replace /MSIE (\d+)/ with /MSIE ([\d.]+)/


Most importantly, dont forget to Close the browser/tab and open the site again. Otherwise this meta tag wont work !

My solution after hours of debugging was pretty simple.

I make the fckeditor.js include the last javascript include. If it was buried in between a bunch of other js includes it would fail in IE 10. When I dropped it down to the last javascript file to include it worked.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!