in our CMS system, we are using plain text textarea, tinymce and wymeditor for editing content.
I've tuned tinyMCE and now I'm trying to integrate wymeditor. On the screen we have multiple textareas and button for switching between editors. For testing purpose I've commented all tinyMCE stuff and concentrated to wymeditor turn on/off button. It works and according to this post http://forum.wymeditor.org/forum/viewtopic.php?f=2&t=583&p=2067&hilit=destroy&sid=a1ba98e9a7afcd8ed5d5573c99fd0c6f&sid=a1ba98e9a7afcd8ed5d5573c99fd0c6f#p2067 I'm trying to destroy all instances of WYMeditor:
jfh wrote:Following code should help, calling update() and removing WYMeditor instances from the DOM and the instances array:
- Code: Select all
jQuery.each(WYMeditor.INSTANCES, function() {
this.update();
$(this._box).remove();
$(this._element).show();
delete this;
});
The instances disappear, but there is still some event in DOM that prevent from editing and saving plain textarea content - every time the content from destroyed wymeditor appears before submit. Therefore I assume, that the WYMeditor isn't really destroyed. The object WYMeditor has instance.
Please help, I'm begining to be desperate
Thanks for any advice.