FCK Editor not working

Rashid picture Rashid · Dec 2, 2013 · Viewed 13.9k times · Source

FCK Editor is not loading for IE11. This is due to the new user agent for IE11.

Similar problem came with IE10 which had the following fix-

var sBrowserVersion = navigator.appVersion.match(/MSIE ([\d.]+)/)[1] ; (refer-FCKEditor doesn't work in IE10)

Is there a similar kind of fix for IE11 also ?

Please Help.

Answer

el Doctor Who picture el Doctor Who · Feb 27, 2014

In order to fix this issue (FCKEditor compatibility with IE11), you have to add the IE 11 check to FCKEditor within the appropriate file that generates the editor instance. In our case this is fckeditor_php5.php:

else if ( strpos($sAgent, 'Gecko') !== false )
{
    // Internet Explorer 11
    $iVersion = (int)substr($sAgent, strpos($sAgent, 'rv:') + 3, 2) ;
    return ($iVersion >= 11) ;
}

Note: the above was added to function FCKeditor_IsCompatibleBrowser().

Then you have to add emulation for IE 9 or IE 8 to the page (IE 10 did not work for us):

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

Note: the above has to be added within the head tag