Jump to content

Auto-wrapping all images in a div tag


Vikestart
 Share

Recommended Posts

Hey,

I'm just starting out with Processwire, coming from WordPress, and I'm really happy with this CMS so far. :)

However, I have been searching the internet for hours now without finding an answer to this:

How can I have images automatically wrapped inside div tags?

An alternative would be to give the parent <p> tag a specific class. I just need to control the parent of the image tags for styling purposes.

Link to comment
Share on other sites

2 minutes ago, Macrura said:

one way would be with jquery; another way would be with a textformatter applied to the rte field, in which you could use something like simple html dom parser, to wrap those....

I know I could do it with jQuery, but I don't want to use Javascript because then there is a delay before the changes are applied, and since this is needed for CSS styling, the delay would be very obvious.

As for the second method you describe, I have no idea what any of that means :P Care to elaborate? ^_^

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...