This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

sfTinyMCEConfigPlugin error with multiple TinyMCE instances in backend

Forum to discuss ExtJS and other JS plugins

sfTinyMCEConfigPlugin error with multiple TinyMCE instances in backend

by nicolas.ricci » Wed Oct 08, 2008 12:28 pm

Hi,

In a backend generated module if you try to use multiple instances of TinyMCE with the sfTinyMCEConfigPlugin enabled in your settings only the first instance will be embedded with the rich text editor.

The error seems to come from the control_name using brackets
Code: Select all
'control_name' => 'object_name[field_name]'

but I did not manage to make a proper fix for it.


The solution I came up with is to change your control_name to
Code: Select all
'control_name' => 'field_name'

and then update your updateClubFromRequest method accordingly in your action.

If anyone has already met this problem and fixed it I am interested :)~ :-)~ :smile:

Thanks
Nico
nicolas.ricci
Junior Member
 
Posts: 10
Joined: Fri Apr 11, 2008 6:56 pm

Re: sfTinyMCEConfigPlugin error with multiple TinyMCE instances in backend

by nicolas.ricci » Wed Jun 03, 2009 4:50 pm

One year later ...

In case someone gets the same problem here is the proper fix.

In your object_textarea_tag, simply add an id

object_textarea_tag($your_object, 'yourMethod', array (
'id' => 'yourId',
);

The problem comes from the sfRichTextEditorTinyMCEExtended class which gives the same id to all your fields "mce_editor_0"

Cheers
Nico
nicolas.ricci
Junior Member
 
Posts: 10
Joined: Fri Apr 11, 2008 6:56 pm