Alacrify Ltd

Internet Explorer 7 and CK Editor Integration Problems


14th January 2011

Internet Explorer 7 and CK Editor Integration Problems

Have you ever been confused by IE7 randomly failing to load a CK Editor Instance without throwing any JavaScript errors? Perhaps it even works on some pages, but not others despite using the same template?

If like me the answer to both these question is a loud and obscenely phrased "yes" I would invite you to delay your IE burning in effigy and hear a suggestion for a solution:

Luckily the fix is extremely simple. As it turns out Internet Explorer 7 has problems loading CK Editor if a field has a specific ID. Kind of like reserved words in a programming language IE doesn't like you using certain things for your IDs. One common example that catches people out is a field with the ID "description". When Internet Explorer encounters this it will silently fail to replace the text area with CK Editor and just leave it as it found it.

The best way around this is probably to pre-pend textarea field ids with another string. I tend to use "cke-" (e.g. cke-description) as it preserves the name of the field and also gives some indication of why it has been done that way.

Once you’ve saved your changes and reloaded the page it would begin to work consistently across your fields. Who knows, maybe you'll even grow to love IE7's mischievous and quirky nature. Just like how you can't help but feel sorry for Wylie Coyote when he fires himself into a wall with an oversized Acme rocket, Internet explorer may gain a small place in your heart... Well. Probably not your heart but certainly your recycle bin.

Previous News Post