16
General Extensions / Multiple instances of timymce on admin pages
« on: July 26, 2016, 12:11:02 AM »
When placing more than one "texteditor" (aka tinymce instance) type form field on an admin side form, only the last tinymce instance works properly.
Any instances placed before the last one have these problems: 1) When switching to visual mode, the text area looses all formatting and buttons. Switching back shows correct HTML/Text View. 2) The field acts as an updateable field (ie. turns orange).
I took a look at the jquery code in the form/text_area.tpl file. First thing I noticed was 'tinymce.remove();' was at the very top which appears that the second instance would kill the first instance, but removing it had no affect one way of the other.
One thing I did find is that the value for 'activeEditor' was the last tinymce instance when you clicked on the first. This would suggest to me that activeEditor should be defined. I tried a few solutions, but could not get any to work properly.
Does anyone have a fix for this or a suggestion of how to proceed? The extension I am working on really needs multiple instances of tinymce on the page. This problem appears to be one of the downsides of switching from ckeditor.
Don
Any instances placed before the last one have these problems: 1) When switching to visual mode, the text area looses all formatting and buttons. Switching back shows correct HTML/Text View. 2) The field acts as an updateable field (ie. turns orange).
I took a look at the jquery code in the form/text_area.tpl file. First thing I noticed was 'tinymce.remove();' was at the very top which appears that the second instance would kill the first instance, but removing it had no affect one way of the other.
One thing I did find is that the value for 'activeEditor' was the last tinymce instance when you clicked on the first. This would suggest to me that activeEditor should be defined. I tried a few solutions, but could not get any to work properly.
Does anyone have a fix for this or a suggestion of how to proceed? The extension I am working on really needs multiple instances of tinymce on the page. This problem appears to be one of the downsides of switching from ckeditor.
Don