Make wmd-editor not post html?

I have code similar to 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>

I don't seem to need a name for the editor to work, but I need to use a name so that I can publish the data. The problem is that I DO NOT get the text data that the user enters, but the generated html from the label editor. How to set it so that I get the usual raw html that the user types?

+3
source share
2 answers

Change the output option from HTML to markdown.

It looks something like this:

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

, , : html, , javascript , html, , . .

+2

Source: https://habr.com/ru/post/1730433/


All Articles