readme.rst 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. Summary
  2. ===========
  3. This plug-in:
  4. - Adds a `style="width: ???px;"` attribute to any `<img>` tags in the content, by checking
  5. the dimensions of the image file and adding the appropriate style="width: ???px;" to the `<img>` tag.
  6. - Also finds any `div class="figures"` tags in the content, that contain images and adds the same style to them too.
  7. Assuming that the image is 250px wide, it turns output like this:
  8. <div class="figure" style="width: 250px;">
  9. <img style="width: 250px;" alt="map to buried treasure" src="/static/images/image.jpg" />
  10. <p class="caption">
  11. This is the caption of the figure.
  12. </p>
  13. <div class="legend">
  14. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
  15. tempor incididunt ut labore et dolore magna aliqua.
  16. </div>
  17. </div>
  18. into output like this:
  19. <div class="figure" style="width: 250px;">
  20. <img style="width: 250px;" alt="map to buried treasure" src="/static/images/image.jpg" />
  21. <p class="caption">
  22. This is the caption of the figure.
  23. </p>
  24. <div class="legend">
  25. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
  26. tempor incididunt ut labore et dolore magna aliqua.
  27. </div>
  28. </div>