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

opposite of wymeditor()?

Support forum for WYMeditor.

opposite of wymeditor()?

Postby ccurvey on Fri Apr 24, 2009 12:36 pm

Perhaps this is in the docs and I'm just being thick, but I'd appreciate a pointer. Let's say I have the following HTML

<div class="editme">
This is something old.
</div>

I know that I can use $('editme').wymeditor() to convert all my textareas to editors. That's great. I edit the text, I save the text via and Ajax call. All is well.

Now how do I convert the editors back into plain divs?
ccurvey
 
Posts: 3
Joined: Thu Apr 23, 2009 11:55 am

Re: opposite of wymeditor()?

Postby mr_lundis on Fri Apr 24, 2009 12:58 pm

Just hide the editor using CSS, and then grab the editor content and insert it into your DIV.
Code: Select all
var conten = $.wymeditors(0).html();
$(<editor selector>).hide();
$(<your div>).html(content);
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