This question is locked. New answers and comments are not allowed.
Hi,
I am using telerik editor to create rich text property of my model. I create a model and it saves into DB successfully. But when I try to rebind the text in Edit view, I found it always render text with html tags other than compiled rich text.
Below is the value when debugging, which is simply saved from editor's model binding in Create view:
<p>test<strong> body,</strong>a new <span style="text-decoration:underline;"><em>text</em></span></p>
And I used three ways to bind this property:
They all render:
in the editor.
Anyone knows where am I wrong? Thanks a lot
I am using telerik editor to create rich text property of my model. I create a model and it saves into DB successfully. But when I try to rebind the text in Edit view, I found it always render text with html tags other than compiled rich text.
Below is the value when debugging, which is simply saved from editor's model binding in Create view:
<p>test<strong> body,</strong>a new <span style="text-decoration:underline;"><em>text</em></span></p>
And I used three ways to bind this property:
<%= Html.Telerik().EditorFor(model => model.Body))%><%= Html.Telerik().Editor().Name("Body").Value(Model.Body)%><%= Html.Telerik().Editor().Name("Body").Value(HttpUtility.HtmlDecode(Model.Body))%><p>test<strong> body,</strong>a new <span style="text-decoration:underline;"><em>text</em></span></p>Anyone knows where am I wrong? Thanks a lot