I am using WMD-Editor and would look to store both the Markdown and HTML version of the text that is entered.
I can only seem to get access to the output as Markdown OR HTML, but not both.
I am using ASP.NET MVC and am trying to get something like the following code to work ... just don't know how to get at the HTML.
Here is a snippet of the HTML code:
<p>
<%= Html.TextArea("Body", this.Model.Body )%>
<%= Html.ValidationMessage("Body", "*") %>
<div class="wmd-preview">
</div>
</p>
Here is what I would like to do in my controller:
[AcceptVerbs(HttpVerbs.Post), Authorize]
public ActionResult Edit(int id, FormCollection collection)
{
...
article.Title = collection["Title"];
article.Body = collection["Body"];
article.BodyHtml = collection["BodyHtml"];
...
}
Any ideas on how to make this happen would be much appreciated!