Forum closed. New forum available at http://community.wymeditor.org/

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

Support forum for WYMeditor.

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

Postby peterfarsinsen on Mon Jun 22, 2009 1:56 pm

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?
peterfarsinsen
 
Posts: 1
Joined: Mon Jun 22, 2009 1:18 pm

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

Postby mr_lundis on Fri Jun 26, 2009 8:29 am

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! ;)
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests