Copied to clipboard

Flag this post as spam?

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


  • Snow lizard 36 posts 106 karma points
    Jan 27, 2016 @ 16:04
    Snow lizard
    0

    Strip paragraph tag from Rich Text Editor

    Hi,

    I'd like to strip the paragraph tag from Rich Text Editor text so my text renders as

    <span class="more">Text</span>

    at the minute it looks like:

    <span class="more"><p>Text</p></span>

    My code is in a partial view and looks like:

    <div class="comment more">@item.GetProperty("readMore").Value</div>

    How would I do this.

    Thanks in advance

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jan 27, 2016 @ 16:12
    Dave Woestenborghs
    0

    If you don't want paragraph tags why use a Rich Text Editor ? Isn't it better to use a text box or text area in this case ?

    Dave

  • Snow lizard 36 posts 106 karma points
    Jan 27, 2016 @ 16:32
    Snow lizard
    0

    Thanks Dave. I still need to have line breaks and links etc in the text. The text area and text box remove the line breaks.

Please Sign in or register to post replies

Write your reply to:

Draft