stephen.judd@unh.edu
tinyMCE is a rich-text editor implemented with javascript that "converts" traditional textarea boxes with a WYSIWYG control. It appears to work by creating an iFrame and hiding the normal textarea box.
The repeat behavior available via the wForms javascript extension from the Form Assembly allows you to create sections of a form that can be duplicated by the user.
When combining these two a problem occurs because the repeat behavior appends a row count suffix to each repeated element so it is unique and can be handled upon submission. In doing so, the repeated tinyMCE elements can no longer work
Update: Thanks to Cedric at the Form Assembly for the customization, I now have this working. View the working example.
Using DOM inspector, you can see that tinyMCE creates a span just before the textarea element with an id of mce_editor_0_parent. The elements within the span have id's like mce_editor_0, mce_editor_0_italic, mce_editor_0_bold. When they get repeated by the wForms behavior, the ids become mce_editor_0_parent_2, mce_editor_0_2, mce_editor_0_italic_2, etc.
My thought on how to get around this is to have the wForms repeat behavior NOT repeat the span which holds the mce editor, but DO repeat the hidden textarea. Then after the section is repeated, call tinyMCE to create the editor for the repeated text area (then the ids would be correct: mce_editor_2, mce_editor_2_parent, mce_editor_2_italic, etc.)
Update: Thanks to Cedric at the Form Assembly for the customization, I now have this working. View the working example.