1

Topic: how to reuse editor pane in firefox?

Hi,

I'm currently rewriting my site using the Google Web Toolkit (GWT). You can see my test page at http://www.goannatravel.com/test/goanna .

Anyway, I'm now doing saves, etc through asynchronous calls and as such, I'm reusing the editor pane. However, I can't get it to work properly with Firefox. How can I do this? If you'd like to see what I mean, go to my test page and Click Edit. Then choose another Journal and Click Edit again. The second time, the editor pane is grayed out.

This is basically the process I thought should work:
  textarea.value = "foo";
  tinyMCE.updateContent(textarea.id);

It works in Internet Explorer, but not in Firefox.

I've also tried executing the reset design mode command first, ie.:
  tinyMCE.execCommand('mceResetDesignMode', true);

Finally, I've tried a completely different approach of:
  tinyMCE.selectedInstance = tinyMCE.getInstanceById(textarea.id);
  tinyMCE.setContent(textarea.value);

None of these are working (well, they work in IE)... I figure that there's probably just another command I need to execute. Any ideas?

Thanks,


Aaron Watkins
-----------------
My Site: http://www.goannatravel.com

2

Re: how to reuse editor pane in firefox?

Now fixed (but I think it's done in the wrong way). Please let me know if there's a better approach.

The way I've written my app is to remove content from the main pane and then add the new content to it. This appeared to be causing issues for Firefox.

I've now changed my approach so that before removing the editor from the pane, I now do a:
  tinyMCE.execCommand('mceRemoveControl', false, id)

I also no longer do an update, but always exec the mceAddControl command.

This means it always works, but I think it's inefficient and leads to a slight 'flash' while the textarea is converted to an editor pane.

If anyone knows a better way, please let me know.


Cheers,
Aaron