This is a migrated thread and some comments may be shown as answers.

How to Decode Html

1 Answer 613 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Krasimir
Top achievements
Rank 1
Krasimir asked on 22 Mar 2013, 08:45 PM
enter code hereHow to see Bold , italic etc text?I have this in my  create view:
 @(Html.Kendo().EditorFor(model => model.Content))
In my cotroller this :
 Content = HttpUtility.HtmlDecode(opininonmodel.Content)
,i try with Server.HtmlDecode , but still see html tags not what they make.

In index View where result should show I have this : 
@foreach (var item in Model)
{
@Html.DisplayFor(modelItem => item.Content)
}

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 25 Mar 2013, 12:05 PM
Hello Krasimir,

The Razor view engine encodes HTML strings automatically when serving them to the client, so please make sure you are not doing that too, as this will result in double encoding and seeing tags inside the Editor, instead of the expected content.

You can refer to the offline Kendo UI MVC Editor demos, which are included in the distribution package. Let me know if you need additional information afterwards. In this case I suggest you to provide a runnable project, so that I can check your implementation.

Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Editor
Asked by
Krasimir
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or