Copied to clipboard

Flag this post as spam?

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


  • Asif Malik 203 posts 339 karma points
    Apr 12, 2014 @ 12:37
    Asif Malik
    0

    Render HTML from text box

    Hi i should know how to do this but am struggling right now. In the backoffice i have a simple text string where the content editors would like to enter some basic html ... line breaks <br /> .... but on the front end it shows the text <br /> instead of it being html.

    I do have the Umbraco Core Property Editor Converters installed and cant figure out what i am doing wrong

    @item.GetProperty("title").Value
    
    @item.GetPropertyValue("title")
    

    Neither of the above code works

    Am using umbraco 6.1.6

  • Jeavon Leopold 3020 posts 13310 karma points MVP 8x admin c-trib
    Apr 12, 2014 @ 12:45
    Jeavon Leopold
    103

    You need @Html.Raw, e.g.

    @Html.Raw(item.GetPropertyValue("title"))
    
  • Asif Malik 203 posts 339 karma points
    Apr 12, 2014 @ 12:58
    Asif Malik
    0

    I know this .... just having a bad day :) thanks Jeavon

  • Jeavon Leopold 3020 posts 13310 karma points MVP 8x admin c-trib
    Apr 12, 2014 @ 23:45
    Jeavon Leopold
    0

    No worries, hope your day got better :-)

Please Sign in or register to post replies

Write your reply to:

Draft