Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tejasree Konduru 6 posts 76 karma points
    Mar 03, 2022 @ 10:37
    Tejasree Konduru
    0

    Textbox property

    Hi, I am trying to display the text in one of the text box property called H1.

    I want the learn more, earn more to appear like this:

    Learn More,

    Earn More

    So that the earn more is on a new line for the same property instead of adding a new one.

    I tried adding in a break tag
    but
    is also taken as a text. Is there code in umbraco that we could wrap around the
    so that its not taken as text

  • Chris Norwood 131 posts 642 karma points
    Mar 03, 2022 @ 15:35
    Chris Norwood
    0

    You can do this with @Html.Raw in your view (which is an MVC thing, not an Umbraco thing :)), e.g. assuming you've put the br tag into the property value itself in the back office:

    @Html.Raw(Model.H1) 
    

    Or if you're not using strongly typed models:

    @Html.Raw(Model.Value<string>("H1"))
    
Please Sign in or register to post replies

Write your reply to:

Draft