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="https://www.joomlacontenteditor.net/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="https://www.joomlacontenteditor.net/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="https://www.joomlacontenteditor.net/image.jpg" alt="image" class="" style="float: none; width: 100%; margin: initial;" role="figure" >
<span style="display: block;">Caption</span>
</span>