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
Rich Text Editor - out puts "
" tags at the beginning and the end "
This is by design, the Rich Text Editor is meant to add HTML tags to your content. If you don't need HTML, try the text area.
Then how do we format the text in textarea
The text in the textarea cannot be formatted, if you need to format, use the Rich Text Editor (RTE)
If you try to render the RTE, without using modelsbuilder, you will get the contents of the RTE as a string. That is why you see the HTML tags. For rendering the text as HTML, use Html.Raw(editorAliasHere).
If you have access to Umbraco TV, then take a look here: https://umbraco.tv/videos/umbraco-v7/implementor/working-with-umbraco-data/razor-syntax/htmlraw/documentation/
Like the others have said, this is standard RTE behaviour out-of-the-box.
Although, there are two hacky options - both of which are pretty old school! :-)
Personally, I'd go with option 1, (but I'd probably end up writing my own helper method for it).
ooo, it's just occurred to me, @Umbraco.Field(alias) has a optional parameter for removeParagraphTags.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted