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
From 09:00 To 17:00 Europe/London (BST)
  Thursday, 18 November 2021
  1 Replies
  488 Visits
When making use of the caption plugin, a little JCE JavaScript </components/com_jce/editor/tiny_mce/plugins/caption/editor_plugin.js> places a span element around the img with a lot of inline styling. I understand the need for this, but it clashes with our responsive images solution, without the possiblity to correct by template css. That's why I want to know if there is a way to use some kind of our own override script?
Of course we can place our own script, but it will be overwritten with every update.

In more detail:

Original html-code:
<img src="/image.jpg" alt="image" class="img-50" style="float: left;">


Caption code by JCE:
<span class="wf_caption" style="float: left; max-width: 800px; display: inline-block;" role="figure">
<img src="/image.jpg" alt="image" class="img-50" style="float: none; width: 100%; margin: initial;" role="figure" width="800">
<span style="display: block;">Caption</span>
</span>


Our wish:
<span class="wf_caption img-50" style="float: left; display: inline-block;" role="figure">
<img src="/image.jpg" alt="image" class="" style="float: none; width: 100%; margin: initial;" role="figure" >
<span style="display: block;">Caption</span>
</span>
one week ago
·
#109522
This is not currently possible, although I like the idea and have thought about implementing it at some point.

It would have to be with caption specific css classes though and not custom css classes.

FYI - the caption structure is designed to be responsive, and should be with the code you have above.

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

  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!