Page 1 of 1

Content not editable, when WYMEditor is embedded twice (IE)

PostPosted: Mon Jun 22, 2009 1:56 pm
by peterfarsinsen
Hi,

I have a strange problem with WYMeditor in IE. If the editor is instantiated in the same div twice (whithout refreshing the page in between), the content in the editor is not editable the second time the editor is instantiated. The editor initializes and shows whatever text was in the textarea, but paragraphs etc. in the editor does not respond when clicking them and the caret is never shown.

I do something like this:

// Instantiating
Code: Select all
$('.content .wymeditor:first').wymeditor({...options...});
$('.content').show();


// Removal
Code: Select all
var $html = $.wymeditors(0).html();
$('.content .wymeditor:first').html('');


I've tried all sorts of things. Removing the .content div, removeing the .wymeditor div and setting WYMeditor.INSTANCES = []; Nothing seems to work. Does anybody have any experiences with similar bugs or know how to solve this particular bug?

Re: Content not editable, when WYMEditor is embedded twice (IE)

PostPosted: Fri Jun 26, 2009 8:29 am
by mr_lundis
Hello Peter, and welcome to the WYMeditor forum!
Take a look at this post by Jean-Fran├žois Hovinne for an example of how to destroy a WYMeditor instance. Another option could be to repopulate the current editor instance with new content instead of creating another instance.

Cheers! ;)