-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
15.2.3
Bug summary
Testing out V15 - decided to follow the documentation. So I've not setup models builder / typed doc types - just creating a basic site and playing along like a new user would.
To render a RTE I can just use
@Model.Value("bodyText")
This works - but my instinct is to be specific and typeset
https://docs.umbraco.com/umbraco-cms/fundamentals/design/rendering-content#specifying-types-of-data
Says this should be:
<div>@(Model.Value<IHtmlContent>("bodyText"))</div>
However that doesn't render any text. I've found that HtmlEncodedString works:
@(Model.Value<Umbraco.Cms.Core.Strings.HtmlEncodedString>("bodyText"))
- is the documentation wrong and needs updating or is this a bug?
NOTE - I've tested with both TipTap and Tiny - same result.
Specifics
No response
Steps to reproduce
Create a doc type - add a RTE property. Try to render with type according to the documentation
https://docs.umbraco.com/umbraco-cms/fundamentals/design/rendering-content#specifying-types-of-data
Expected result / actual result
Expected all three razor tags to output the rich text.
RESULT:
Only a non type set and using the Umbraco HtmlEncodedString works.
Not sure if it's just an error in the documentation or a bug?
