[wp-testers] Version Changes On TinyMCE

Jamie Holly hovercrafter at earthlink.net
Mon Oct 30 19:23:22 GMT 2006


I just wanted to throw this out as a heads up. TinyMCE updated to version
2.0.7 a couple weeks ago (and 2.0.8 last week). In the 2.0.7 release they
changed the code on the mceInsetContent method. This now breaks the inline
uploader in IE (actually it involves a loss of focus problem), unless you
put your cursor back into the RTE area then send the image to the editor.
The following is the fix to it.

In the sendToEditor javascript function, change this:

	if ( richedit ) 
		win.tinyMCE.execCommand('mceInsertContent', false, h);
	else
		win.edInsertContent(win.edCanvas, h);  
to this:
	if ( richedit ) {
		win.tinyMCE.execCommand('mceFocus',false, "mce_editor_0");
		win.tinyMCE.execCommand('mceInsertContent', false, h);
	} else
		win.edInsertContent(win.edCanvas, h);

That will force the RTE to regain focus. 

I found this out because I actually override the WP TinyMCE with my own
plugin. I figured I would go ahead and post this here just so people are
aware of it if/when TinyMCE gets updated in the WP core down the road. 

Jamie Holly
http://www.intoxination.net




More information about the wp-testers mailing list