User Tools

Site Tools


dokuwiki_img2fig

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dokuwiki_img2fig [2021/06/16 00:59] – [An image with a caption, centered] sasabedokuwiki_img2fig [2021/06/16 10:59] (current) sasabe
Line 3: Line 3:
 This Javascript code enables the addition of captions to images in pages created on DokuWiki's default template. This Javascript code enables the addition of captions to images in pages created on DokuWiki's default template.
  
-The standard syntax for images is used. Al least you need:+The standard syntax for images is used. At least you need:
  
   {{filename?width|caption}}   {{filename?width|caption}}
Line 12: Line 12:
  
 <code javascript img2fig.js> <code javascript img2fig.js>
-jQuery('.page p>a>img').each(function (index) {+jQuery('.page p>a>img').each(function () {
   const captionSelector = 'title';   const captionSelector = 'title';
   let $img = jQuery(this);   let $img = jQuery(this);
dokuwiki_img2fig.1623772793.txt.gz · Last modified: 2021/06/16 00:59 by sasabe