Issue 3: TinyMCE editor in Gwt uibinder template
Status:  New
Owner: ----
Reported by ben.w...@gmail.com, Sep 29, 2010
What steps will reproduce the problem?
1. add markup in uibinder template to instanciate a TinyMCE editor
2. load the page and you will receive a native javascript error

What is the expected output? What do you see instead?
a standard TinyMCE editor

What version of the product are you using? On what operating system?
Java 1.6
gwt 2.0.4
eclipse 3.6
TinyMCE-gwt 0.2

Please provide any additional information below.
once i comiled the project and opened the tiny_mce_src.js I found the following lines contained the error:

8261		execCommand : function(c, u, v) {
8262			var t = this, ed = t.get(v), w;
8263
8264			// Manager commands
8265			switch (c) {
8266				case "mceFocus":
8267					ed.focus();
8268					return true;
8269
8270				case "mceAddEditor":

Further down you check that ed is not undefined before using it:

8307					if (ed)
8308						ed.remove();
8309
8310					return true;

So I changed the code to:

8261		execCommand : function(c, u, v) {
8262			var t = this, ed = t.get(v), w;
8263
8264			// Manager commands
8265			switch (c) {
8266				case "mceFocus":
8267                                    if(ed)
8268					    ed.focus();
8269					return true;
8270
8271				case "mceAddEditor":

And this eliminated the javascript error.

Nov 19, 2010
#1 keuller....@gmail.com
Hi, this workaround worked for me, but this error that only occurs on FF, in IE7/IE8 it works fine. However with this WA the problem does not occurs but editor does not render okay. Anyone has a sugestion to solve this issue ?