Search code examples
asp.netjavascripthtmlwmd-editor

make wmd-editor not post html?


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?


Solution

  • Change the output option from HTML to markdown.

    It looks something like:

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