I am using the Jquery Wysiwyg editor and I am trying to capture the html that makes up the content area to store in a DB. Is there anyway to get html of a element and save it as a string? My code looks like tihs
<iframe id="wysiwyg_IFrame">
<html>
<head></head>
<body>
<ul>
<li>This is a test</li>
</ul>
</body>
</html>
</iframe>
I would either like to get a string that starts with <html>....</html> or just the body <body>...</body> does anyone know if this is possible? Thanks
I figured out the answer and it was within the horrible documentation of the Jquery Wysiwyg. It actually wasnt even in the documentation it was in part of the wiki. To get the contents you just need to use the text areas divs name and the .va() so for me it was
If you want to set the contents like I am trying to d, ex. grab something from the DB and place it in the text area of the jquery wysiwyg when a page loads, you need to use the setContent method and it would look like this
Thanks for all the answers and yes .html() seems to work in all other instances but will not work with the jquery wysiwyg.