When I add images to a post via the TinyMCE editor I’d like WP to add a wrapping div around the <img> tag like <div class="img-wrapper"><img src="url-to-image" alt="image" /></div>. Is that somehow possible?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
|
|||
|
|
|
I think it is a better idea, if you filter the output, the
To find and replace the img in content use a regex, like this If you use the regex But it is also possible to add markup on insert images in the editor:
|
||||