User Tools

Site Tools


dokuwiki_add_caption

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_add_caption [2021/06/09 22:07] – [Mechanism] admindokuwiki_add_caption [2021/06/16 11:01] (current) sasabe
Line 4: Line 4:
   * This is a small piece of Javascript code to add a caption to a table.   * This is a small piece of Javascript code to add a caption to a table.
   * Works with DokuWiki's default template.   * Works with DokuWiki's default template.
-  * Works with WRAP plugin.+  * Needs WRAP plugin.
   * Just add a line of ''%%<WRAP caption>Caption text</WRAP>%%'' before the table.   * Just add a line of ''%%<WRAP caption>Caption text</WRAP>%%'' before the table.
  
Line 12: Line 12:
  
 <code javascript add_caption.js> <code javascript add_caption.js>
-jQuery('.page div.table>table').each(function (index) {+jQuery('.page div.table>table').each(function () {
   let $table = jQuery(this);   let $table = jQuery(this);
   let $prevDiv = $table.parent().prev();   let $prevDiv = $table.parent().prev();
Line 120: Line 120:
 </code> </code>
  
-Since this transformation is made **after** the rendering by DokuWiki, the normal syntax (such as %%**bold**%%, %%//italic//%%, etc.) can be used in the caption text.+Since this transformation is made **after** the rendering by DokuWiki, the normal formatting syntax (such as ''%%//italic//%%'', ''%%__underline__%%'', etc.) can be used in the caption text.
  
  
dokuwiki_add_caption.1623244035.txt.gz · Last modified: 2021/06/09 22:07 by admin