[EXTENSION] TinyMCE using jQuery

Isn't cache problem? Try to clean.

Yes, Javascript in IE sucks big time, there're problems with cache, with compression, with DOM… dissapointing both for developers and for final users (who will blame your app, not IE). TinyMCE is particularly prone to this kind of problems, which, in my experience, are solved most of the time by cleaning the cache.

Got the same problem myself (in the middle of a demo :( ), however, updating to the latest TinyMCE seems to solve the issue. But, I’m not so sure, because someone else tried before updating the tinymce and the problem persisted. Could you please confirm if  tinymce 3.2.5 works or not in IE?

No, still having the same problem with 3.2.5 in IE.  Now mind you, I've only tried it on on Windows running under VMware.  So, I haven't tried it on other pc's running native Windows and IE… just don't currently have access to one.

rpaulpen> it's the same if you run it on vmware or standalone, it's still the same javascript engine and the same rendering engine (just the PC is virtual). Which HTTP server do you use? Apache? lighttpd?

That’s so weird, because I’d tested and retested with an even older version than the one currently bundled with the extension, and it worked on IE 7 and IE 8, but now it stopped working. The workaround it used to work (deleting the cache) didn’t work this time, and the worst part is that IE didn’t render the page, but a blank page appeared instead, with a “page ready but with errors” in the status bar (I’ve seen this happening with javascript errors since last June, because before the pages were rendereded even with js errors). I must point out that this happened with a Prado widget in a Prado app without the jQuery plugin, so it’s something to do with TinyMCE+IE. In my case updating to 3.2.5 and then deleting the cache seems to have solved the issue, but now I’m not so confident, since this issue didn’t happen before ???

Anyone else having this problem?

P.S. open question to the IE team: is it so hard to fix the mess called IE?  >:(

P.P.S. oh, and in my today's problem, sometimes it worked and sometimes it didn't, sometimes it just failed on postback, but on a GET request the editor loaded fine. It's driving me mad.

i'm using apache 2. I have the exact same problem with the blank screen.

It seems that MSIE loads the plugins before the main script (wonder why, if I guess the main script is the one that loads everything).

Could you post your complete widget call?

<?php $this->widget(‘application.extensions.tinymce.ETinyMce’,







now I have to use this way to change the tinymce layout. and I found out that in the wrap, you might have used explode instead of implode for $this->plugins

another thing is that this extension doesn’t work anymore in IE8, same problem as lots of people mentioned above, is there a way to solve it?


anybody has a way to let this extension work on IE?

Version 1.1 released: fixed bug reported by xzhang, updated to TinyMCE 3.5.2. Sorry for the delay of this bug fix.

what is nice job , thaaaaaaaaaaaaaaaaanks

I’m having some trouble with this extension. While I seem to be able to set most options without any problem, I can’t get tinymce’s cleanup functions to work. Things jut get saved as I entered them in the field, and even if I put the cleanup option in a menubar, it still ignores my valid elements declrations. The declarations are present in the resulting html and javascript code in the browser, so I don’t quite understand why tinymce is ignoring them. explicit calls to $options[‘cleanup: true’] = true have not helped either.

any ideas?



I got this error:

PHP Error


Undefined variable: tinymce

Source File


I wonder why nobody else submitted this, please have a look at the code, where is $tinymce defined?

public function init()


		list($name, $id) = $this->resolveNameID();

      if ($this->useCookies) {

         if (isset($_COOKIE[$id.self::COOKIE_SUFFIX]) && in_array($_COOKIE[$id.self::COOKIE_SUFFIX], array('text', 'html'))) {




      $baseDir = dirname(__FILE__);

      $assets = Yii::app()->getAssetManager()->publish($baseDir.DIRECTORY_SEPARATOR.'assets');

(812)      $tinyOptions = $this->makeOptions($tinymce);

What should $tinymce refer to?

Best regards,


Undefined variables are only reported in error mode STRICT which might be off by default in most installations.

Hi Mike,

OK, I thought this would be E_NOTICE, while E_STRICT checks, i.e. also extended classes and their definitions.

Anyway, I have some other problems, i.e. when using this component within an ajax request.

If compression is on I get this error in Firebug (404 - page not found):


if set to ‘false’:

The ajax request loads and I get a white page without source, looks like tinymce is loading the iframe into the current window.

Tested like this …

first view


$text = "update";

$url = "site/tinyMce";

$ajaxOptions = array("update"=>"#Update");

echo CHtml::ajaxLink($text, $url, $ajaxOptions);


<div id="Update"></div>


public function actionTinyMce()




testTinyMce.php (view)

<?php $this->widget('application.extensions.tinymce.ETinyMce', array('name'=>'htmlxxx',)); ?>

If I place the file ‘tiny_mce_gzip.php’ manually under www/undefined, the errors continue:

tinymce is not defined

anonymous(Object mode=exact elements=htmlxxx language=en, "html", true)index.ph...val/seq/1 (Zeile -109)

[Break on this error] <td>trace</td>\n

How to use the ajax widget, btw: I’ve read: Ajax controls and render partial not being bound


Best regards,


Hello… I had the same problem with undefined variable and I solved by adding

error_reporting(E_ALL ^ E_NOTICE);

but… I don’t think this is the correct solution. It seems like a patch.

The line that causes the error is:

$tinyOptions = $this->makeOptions($tinymce);

That line calls

protected function makeOptions($url='')

so, $tinymce variable is a url. But, which URL is it?



I emptied $tinymce, and it seems that the functionality isn’t affected.


I have a problem running jQuery plugin functinality e.g. getting and setting content of textarea.

I use extension like this:

<?php $this->widget('application.extensions.tinymce.ETinyMce', 

array('model'=> $form, 'attribute' => 'htmlContent', 

'useSwitch'=>false, 'editorTemplate'=>'full', 'htmlOptions' => array('id'=>'htmlContent'))); ?>


And then after that running


returns that tinymce is not a function.

Do I have to specify something to get it working?

Hi to all and thanks for extension. Its great, but when i add some plugins as Image manager it`s not work :unsure:

My code is:

<?php $this->widget('application.extensions.tinymce.ETinyMce',




                    'plugins' => array('filemanager','imagemanager','safari','pagebreak','style','layer','table','save','advhr','advimage','advlink','emotions','iespell','inlinepopups','insertdatetime','preview','media','searchreplace','print','contextmenu','paste','directionality','fullscreen','noneditable','visualchars','nonbreaking','xhtmlxtras','template'),

                    'options' => array(

                        'theme' => 'advanced',

                        'skin' => 'o2k7',

                        'theme_advanced_buttons1' => 'preview,bold,italic,underline,fontselect,fontsizeselect,link,justifyfull,justifyleft,justifycenter,justifyright,pasteword,pastetext,table,image,|,bullist,numlist,|,undo,redo,|,code,fullscreen',

                        'theme_advanced_buttons2' => '',

                        'theme_advanced_buttons3' => '',


                    'value' => $model->data,