I found a solution that works for me.
First off, the updateable field error turned out to be unrelated and caused by another problem. One down.
Also found that adding media did not work correctly either. You click "Add Media" on the first instance then choose an image, it gets added to the second instance. Upon deeper investigation, I found that the first tinymce instance was never even created (no containers).
There were two root causes of the problems:
The first cause is due to the fact that the tinyMCE.activeEditor value does not get the value of the actual active editor. The id of the element needed to be defined in the jQuery script for each instance. After fixing this, I at least got the values to be correct when changing states between edit and visual, but the first tinymce instance was still not being created.
The other problem centered around the init method. As part of testing I created a new tinymce.init with just the selector value. Suddenly everything worked. Using a common array is good in theory but it does not appear to work with multiple instances. What I ended up doing is copying the values in the mcei array in head.tpl to my new init statement.
Everything is now working correctly. I have attached my solution.
I also needed a method to turn off the "Add Media" button for a specific field. I accomplished this by assigning an attribute of no_media to the $form->getFieldHtml array and since I already edited the text_editor.tpl file, added some language to turn off the button. This is a quick fix, but might be something to add to later releases.
Don
First off, the updateable field error turned out to be unrelated and caused by another problem. One down.
Also found that adding media did not work correctly either. You click "Add Media" on the first instance then choose an image, it gets added to the second instance. Upon deeper investigation, I found that the first tinymce instance was never even created (no containers).
There were two root causes of the problems:
The first cause is due to the fact that the tinyMCE.activeEditor value does not get the value of the actual active editor. The id of the element needed to be defined in the jQuery script for each instance. After fixing this, I at least got the values to be correct when changing states between edit and visual, but the first tinymce instance was still not being created.
The other problem centered around the init method. As part of testing I created a new tinymce.init with just the selector value. Suddenly everything worked. Using a common array is good in theory but it does not appear to work with multiple instances. What I ended up doing is copying the values in the mcei array in head.tpl to my new init statement.
Everything is now working correctly. I have attached my solution.
I also needed a method to turn off the "Add Media" button for a specific field. I accomplished this by assigning an attribute of no_media to the $form->getFieldHtml array and since I already edited the text_editor.tpl file, added some language to turn off the button. This is a quick fix, but might be something to add to later releases.
Don

