wmd-editorを使用してtextareaのコンテキストを保存しているときに、問題が発生します。これは、htmlとして保存したいということです。私は次のコードを持っています:
入力要素...
<p>
<%= this.Html.TextArea("Body", topic.Body, new { @class = "big" })%>
</p>
出力マークダウンを作成するためのスクリプト...
<script type="text/javascript">
wmd_options = {
output: "Markdown"
};
</script>
コントローラコード...
[Authorize]
[ValidateInput(false)]
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(FormCollection collection)
{
var topic = WikiService.TopicNew();
topic.Name = collection["Name"];
topic.Body = collection["Body"];
// Just saving the contents
}
私は何かが足りないのですか?テキストエリアのマークダウンバージョンを返さない理由はありますか?