How do I strip out the contents of my Pagedown editor?

127 views Asked by At

I'm not even sure if this is possible, I am using the excellent Pagedown editor (used on this site). Usually my text is in an textarea...

<textarea name="Description">

</textarea>

And my controller class picks this up without a problem. But because I'm using PageDown I have to use a div...

<div class="wmd-preview" id="wmd-preview" name="Description">

</div>

How do I get my controller to map the InnerText of this Html block to my description? And I wants to keep the markup too obviously :-)

1

There are 1 answers

2
David Fox On

If I understand your question, and you're using jQuery could you do this?

$('textarea[name="Description"]').html($('#wmd-preview').html());