You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Online

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

#103472 Change caption HTML output and remove display: inline-block default

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Wednesday, 11 March 2020 19:20 GMT

mikehermary
Hello,

I am using the Caption plugin to wrap some of my images in order to display image attributions. The plugin outputs <span></span>, but I would like to have it output <figure><img /><figcaption></figcaption></figure> to make the output HTML5 compliant.

I would also like to remove the display: inline-block; inline CSS so I can properly center the image container using max-width and display: block;.

Are either of these possible?

Cheers,

Ryan
You can create <figure> markup using the Format list instead of the Caption plugin. Select your image, then select Figure from the Formats list, eg:

https://cdn.joomlacontenteditor.net/tmp/103472-change-caption-html-output-and-remove-display-inline-block-default.gif

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.