Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FCK Editor not working

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.

like image 855
Rashid Avatar asked Dec 02 '13 06:12

Rashid


People also ask

How do I run CKEditor?

To start, create a simple HTML page with a <textarea> element in it. You will then need to do two things: Include the <script> element loading CKEditor 4 in your page. Use the CKEDITOR.

How do I know if CKEditor is loaded?

// At the top of the script CKEDitor_loaded = false; // then later CKEDITOR. on('loaded', function(){ CKEditor_loaded = true; });

How do I allow all HTML tags in CKEditor?

If you want to allow all If you want to disable Advanced Content Filter, set CKEDITOR. config. allowedContent to true. All available editor features will be activated and input data will not be filtered.

Does CKEditor need jQuery?

Of course, possible use CKEditor without jQuery. jQuery adapter used only for treat CKEditor as jQuery object via $. All basic CKEditor plugins(components) not used jQuery too. However, a few extented CKEditor plugin as "Accessibility Checker" demand of jQuery.


2 Answers

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

like image 195
el Doctor Who Avatar answered Oct 04 '22 12:10

el Doctor Who


Try this:

navigator.appVersion.match(/rv:([\d.]+)/)[1]

Since IE11 user Agent String doesn't have MSIE key, therefore the exact version is given by rv: key.

like image 29
Ayush Kumar Avatar answered Oct 04 '22 11:10

Ayush Kumar