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
What is alternative method for mutliline text area line brakes in umbraco 8.
In Umbraco 7, we had the following extension method in umbraco helper.
Thanks in advance
I tend to just add .Replace(Environment.NewLine, "<br />") to the output so
.Replace(Environment.NewLine, "<br />")
Model.TextareaOutput.Replace(Environment.NewLine, "<br />")
Model.Value("textareaOutput").Replace(Environment.NewLine, "<br />")
I was just looking for this today as well. I found there is now an HtmlHelper:
Note that it returns HtmlString, not string!
I initially copied the v7 string extension but had to revisit where I was using it, so I was searching for my extension (same name) and happened to find the HtmlHelper in /Views/Partials/Grid/Editors/Textstring.cshtml
ReplaceLineBreaksWithHtml is deprecated
I can't believe this isn't in the docs.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted