我可以直接发布contentEditable DIV的内容吗?我能想到的唯一办法是将innerHtml复制到隐藏的输入元素中,但我相信必须有更直接的方式。在MVC的contentEditable DIV中发布HTML
查看:
<div name="typer" id="typer" onclick="eraseFirst();this.contentEditable='true';">
Text here that the user typed, with html elements. How is this posted?
</div>
控制器:
[HttpPost]
public ActionResult BlogPage(BlogsPosts blogsposts)
{
// Is this a good start?
return View(blogsposts);
}
我在此期间开始这样做。我也想不出其他任何方式。谢谢! – Dave 2012-08-15 01:34:49