Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have trouble understanding what Html.Raw is for.
In my scriptfile, can I just write this:
@Model.bodyText
or do I have to write:
@Html.Raw(@Model.bodyText)
What is the best way to get the content from a property with datatype Richtext editor?
/Kate
If you are using Rte its best not to use Html.Raw
Here some more explantions http://umbraco.com/follow-us/blog-archive/2011/3/13/umbraco-razor-feature-walkthrough-part-5.aspx
However if you want to get ride of p tag when rendering the rte you can do this
Library.StripHtml(Model.BodyText, "p")
Hi Kate,
I think this documentation http://umbraco.tv/videos/implementor/working-with-umbraco-data/razor-syntax/htmlraw/documentation/ will give an good explanation when you have to write
And when you just can use:
Here is a video also that explains it: http://umbraco.tv/videos/implementor/working-with-umbraco-data/razor-syntax/htmlraw/
/Dennis
Hi
Thanks to both of you. Now I have a bit of reading to do :-)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Html.Raw or not
I have trouble understanding what Html.Raw is for.
In my scriptfile, can I just write this:
@Model.bodyText
or do I have to write:
What is the best way to get the content from a property with datatype Richtext editor?
/Kate
If you are using Rte its best not to use Html.Raw
Here some more explantions http://umbraco.com/follow-us/blog-archive/2011/3/13/umbraco-razor-feature-walkthrough-part-5.aspx
However if you want to get ride of p tag when rendering the rte you can do this
Hi Kate,
I think this documentation http://umbraco.tv/videos/implementor/working-with-umbraco-data/razor-syntax/htmlraw/documentation/ will give an good explanation when you have to write
And when you just can use:
Here is a video also that explains it: http://umbraco.tv/videos/implementor/working-with-umbraco-data/razor-syntax/htmlraw/
/Dennis
Hi
Thanks to both of you. Now I have a bit of reading to do :-)
/Kate
is working on a reply...