dokuwiki_img2fig
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dokuwiki_img2fig [2021/06/07 19:59] – ↷ draft:dokuwiki_img2fig から dokuwiki_img2fig へページを移動しました。 admin | dokuwiki_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' | This Javascript code enables the addition of captions to images in pages created on DokuWiki' | ||
| - | The standard syntax for images is used such as: | + | The standard syntax for images is used. At least you need: |
| - | {{image_filename?image_width|caption}} | + | {{filename?width|caption}} |
| ===== Code ===== | ===== Code ===== | ||
| Line 12: | Line 12: | ||
| <code javascript img2fig.js> | <code javascript img2fig.js> | ||
| - | jQuery(' | + | jQuery(' |
| const captionSelector = ' | const captionSelector = ' | ||
| let $img = jQuery(this); | let $img = jQuery(this); | ||
| Line 43: | Line 43: | ||
| </ | </ | ||
| - | Add whatever **figure** styles to your CSS file (probably '' | + | You can add whatever **figure** styles to your CSS file (probably '' |
| - | <code css styles.css> | + | <code css style.css> |
| figure.medialeft { | figure.medialeft { | ||
| margin-right: | margin-right: | ||
| Line 73: | Line 73: | ||
| ==== An image with no caption ==== | ==== An image with no caption ==== | ||
| - | {{https:// | ||
| - | {{https:// | + | |
| + | {{: | ||
| ==== An image with a caption ==== | ==== An image with a caption ==== | ||
| Line 82: | Line 82: | ||
| The image width should be defined as %%{{location? | The image width should be defined as %%{{location? | ||
| - | {{https:// | + | {{:img: |
| - | {{https:// | + | {{:img: |
| ==== An image with a caption, float to right ==== | ==== An image with a caption, float to right ==== | ||
| - | {{ https:// | + | {{ :img: |
| + | |||
| + | {{ : | ||
| - | {{ https:// | ||
| Body text is here. | Body text is here. | ||
| Line 101: | Line 102: | ||
| ==== An image with a caption, float to left ==== | ==== An image with a caption, float to left ==== | ||
| - | {{https:// | + | {{:img: |
| - | {{https:// | + | {{:img: |
| Body text is here. | Body text is here. | ||
| Line 113: | Line 114: | ||
| ==== An image with a caption, centered ==== | ==== An image with a caption, centered ==== | ||
| - | {{ https:// | + | {{ :img: |
| - | {{ https:// | + | {{ :img: |
| Body text is here. | Body text is here. | ||
dokuwiki_img2fig.1623063570.txt.gz · Last modified: 2021/06/07 19:59 by admin
