I hope the editor can be encoded because I want to post the editor text to the controller,but I find that when I refresh the page(click F5),the editor encode the text again.My Model.Body also contains html mark: For example, first Time enter the page is OK,and show "My Model Body Is Here",and I refresh the page it show the html mark like below,but I just want to encode only one time,I also use no cache but it do not work.Third time I refresh the page,it encode again,and show <table><tbody>...
Model:
//after search,my Model.Body is here
<
table
>
<
tbody
>
<
tr
><
td
align
=
"center"
style
=
"font-weight:bold;"
>
<
span
style
=
"background-color:#ccff33;"
>My Model Body Is Here</
span
>
</
td
></
tr
>
</
tbody
>
</
table
>
View:
@(Html.Kendo().Editor()
.Name("Body")
.Tools(tools => tools.Clear()
.Bold().Italic().Underline().Strikethrough()
.JustifyLeft().JustifyCenter().JustifyRight().JustifyFull()
.InsertUnorderedList().InsertOrderedList()
.Outdent().Indent()
.CreateLink().Unlink()
.InsertImage()
.SubScript()
.SuperScript()
.ViewHtml()
.FontName()
.FontSize()
.FontColor().BackColor()
)
.HtmlAttributes(new { style = "width:90%;height:500px" })
.Value(Model.Body))
Controller:
[OutputCache(Duration = 0)]
public ActionResult Index(int id=0)
{
return View(ModelRepository.GetModelById(id));
}