Question

I am having issues with <cftextarea> with richtext="true" in IE10. The problem is that <cftextarea> uses FCK Editor which appears to be incompatible with IE10.

It is going to be a huge job reworking this using CK Editor (which would be my first choice). Does anyone know how to force the built-in ColdFusion rich text editor to be compatible with IE10?

I have tried editing the fckeditor.js and fckutils.cfm file so that it takes into account the IE10 version number using two digits. However, these files do not seem to be being picked up/used by the cftextarea instance that I am using. However, the fckeditor.html file is being hit.

The changes I made to fckeditor.js:

// Internet Explorer 5.5+
if ( /*@cc_on!@*/false && sAgent.indexOf("mac") == -1 )
{
    //var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ;
    var sBrowserVersion = navigator.appVersion.match(/MSIE ([\d.]+)/)[1] ;
    return ( sBrowserVersion >= 5.5 ) ;
}

The changes I made in fckutils.cfm

// check for Internet Explorer ( >= 5.5 )
if( find( "msie", sAgent ) and not find( "mac", sAgent ) and not find( "opera", sAgent ) )
{
    // try to extract IE version
    stResult = reFind( "msie ([0-9]+\.[0-9]+)", sAgent, 1, true );
    if( arrayLen( stResult.pos ) eq 2 )
    {
        // get IE Version
        sBrowserVersion = mid( sAgent, stResult.pos[2], stResult.len[2] );
        if( sBrowserVersion GTE 5.5 )
            isCompatibleBrowser = true;
    }
}

For the cftextarea FCK Editor instance, should I be making any other changes somewhere?

Was it helpful?

Solution

I resolved the issue by using the ajaxonload() function in coldfusion.

OTHER TIPS

I was completely unable to get this to work with IE 10 in CF9. I tried the changes you suggested, but there were several other JavaScript errors on IE10.

The problem is that CF is using an old version of CKEditor (still going by the original name FCKEditor). You might want to try downloading the latest version of CKEditor and using them in your project. That is what I did, and I found it pretty easy to implement. Basically you just include ckeditor.js in a script tag, then give any <textarea> tag a class="ckeditor" attribute, and the library takes care of everything else for you.

Obviously this is a lot easier if you use a common component to generate your text fields. If you have random <cftextarea> tags all over the place you will have to do a much bigger search/replace.

You could also try updating the library in CFIDE, but that might lead to more problems than it is worth.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top