February 8, 2009

Fix for ‘tinyMCE is undefined’ error in Internet Explorer

Filed under: Tips — Tags: , , , — Webopius @ 6:11 pm

In Drupal, the WYSIWYG module, TinyMCE and Img_Assist are commonly installed to provide a reasonable Editing environment along with the ability to embed images into posts.

Unfortunately, the cobmination of TinyMCE module along with Img_Assist can cause problems on IE6 and IE7.

The symptom

If you get “Error: ‘tinyMCE is undefined’ ” error in IE6 and IE7 and if you view the page source, you see something like this:

<script type="text/javascript" src="/sites/all/modules/img_assist/drupalimage/langs/en.js?M"></script>

The Fix

When running Img_assist, wysiwyg editor and TinyMCE, here’s the fix:

In editor_plugin.js (/site/all/modules/img_assist/drupalimage)

At approx line 6, replace this line:


With this:

// FIX TinyMCE problem...
tinyMCE.addI18n('en.img_assist', {desc : 'Insert or update an embedded image.'});
// ...END

  • Tags