4

This is the default HTML Froala produces for images:

<p>
 <span class="fr-img-caption fr-fic fr-dib" style="width: 300px; width: 300px;">
    <span class="fr-img-wrap">
      <img src="..."><span class="fr-inner">Image caption</span>
    </span>
 </span>
</p>

What if I want to change this HTML structure to something like

<figure>
    <img src="..." alt="">
    <figcaption>Caption</figcaption>
</figure>

So the image size, caption text and additional attributes may stay the same but the surrounding HTML tags are changed.

HTML code for image is hard-coded in image.min.js that comes with Froala, so the ideal solution would be to have an option to specify a html template for images, but since Froala does not provide it in the current version - I am looking for other options, any help will be appreciated.

Alex Paramonov
  • 2,630
  • 2
  • 23
  • 27

0 Answers0