Search code examples
umbraco8

Umbraco 8 how to line break in textareaEditor


When using Umbraco textarea, I need to have multiple lines with the <br/> tag

code is here

var subTitle = item.Value("sliderSubTitle");

and html code is

div>
                                @subTitle
                            </div>

but data comes in single line


Solution

  • Can you check this?

    <div>
    @Html.Raw(subTitle.Replace("\n", "<br />"))    
    </div>