views:

59

answers:

2

I have code similar to the below

<form action="/u" method="post">
<div class="reply">
<input type="hidden" name="type" value="2"/>
<input type="hidden" name="id" value="1"/>
<input type="hidden" name="parentId" value="0"/>
<textarea name="text" style="width: 500px; height: 200px;"></textarea><div class="rhs"><button>Post Comment</button></div></div>
</form>

It seems that i dont need a name for the editor to work however i need to use name so i can post the data. Issue is i do NOT get the text data that the user enters but the generated html from markdown editor. How do i set it so i get the normal raw html that the user types?

+4  A: 

Change the output option from HTML to markdown.

It looks something like:

Attacklab.wmd_defaults = { 
  version: 1, output: "markdown", lineLength: 40, delayLoad: false 
};
Brandon
A: 

Although this question has already been answered here is an additional tip that may be of relevance: There is an easy way to post both the html and the markdown, by posting via javascript and using the preview component to get the html, and the textarea to get the markdown source. Here is a blog post by me with more details.

mtomis