ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

removing <p> tags from <img>

November 04, 2010 8:43am

Subscribe [2]
  • #1 / Nov 04, 2010 8:43am

    ICCRS

    30 posts

    I was wondering if there is something ee specific I can do to prevent tags from being wrapped around a field that is *not* set to formatting: none.

    So, I want the default text formatting to be set to XHTML for my client, but I don’t want images inserted through the File chooser to be wrapped in tags.

  • #2 / Nov 04, 2010 9:05am

    MarketingMatters

    28 posts

    If are you on 1.6.x - get Mark Huot’s strip_p plugin. It creates a tag set that will strip the Ps from the xhtml.

  • #3 / Nov 04, 2010 9:15am

    ICCRS

    30 posts

    I’m using 2.1.1 but thanks for the suggestion, I’m searching now for a plugin that functions similarly.

  • #4 / Nov 04, 2010 9:19am

    MarketingMatters

    28 posts

    Just curious - have you tried changing the field type to “none” and just giving it css / class on your own?

    I am unsure of the result.

  • #5 / Nov 04, 2010 9:33am

    ICCRS

    30 posts

    I’m trying to make things easy for the client, so I would prefer the formatting for everything except images. This is because I’m making a print stylesheet with a parent property that ends up applying to images, even if they’re hidden. I’ve ended up narrowing the style down to affecting just those elements that are enclosed in tags. However, I have to make it possible to add images to the body text, but anything put in that way will get wrapped in tags. So, I’m now attempting to use low_replace to undo that.

    Stupidly long solution for a very tiny problem. :/

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases