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 some content (from rte) wrapped in a paragraph. How do I remove the paragraph without having the rest of the html-tags removed or handled as plain text?
This will work:
<h1>@Umbraco.Field("CoverHeadline", removeParagraphTags: true)</h1>
... BUT I want to use the Model to get it more strongly typed ... and the following will (of course) generate an error:
<h1>@Umbraco.Field(Model.Content.CoverHeadline, removeParagraphTags: true)</h1>
I have tried this (and many more variants):
... the paragraph is removed but the rest of the html is shown as plain text (tags are shown as text).
I have tried this as well:
... but it removes both the paragraph and all other html-tags (a span and a break) "inside" the paragraph.
I have tried with a helper-class, regex and much more - but the result is html as plain text.
Try this code:
YES! Thanks a lot. That will do the job :-)
You are welcome, Marrix.
Have a great day, ask questions on our forum!
I will (ask questions) - be sure on that :-D
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted