We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53460
    • 69 Posts
    I have a TV that uses a richtext type so that I can have hyperlinks in the output. But it's adding the default <p> tags to the output. I was trying to use the stripTags modifier, but it's stripping ALL tags...including the <a> tag. What am I doing wrong?

    My output is this:
    <li>[[+listItem:stripTags=`p`]]</li>


    I'm probably just not putting the right character in the modifier. But the Docs doesn't provide any examples.

    Thanks in advance.
      • 17301
      • 932 Posts
      what richtext editor are you using? with most of them you can usually go into system settings and disable the wrapping of <p> tags around everything.
        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 3749
        • 24,544 Posts
        The argument to striptags specifies the tags you want it *not* to strip. Also, they need to be full tags. This might work:

        <li>[[+listItem:stripTags=`<a>`]]</li>
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting