====== Ad-Hoc Tables Plugin ====== ---- plugin ---- description: Adds table syntax to the Ad-Hoc HTML plugin. author : sascha-leib email : ad@hominem.info type : syntax lastupdate : 2023-04-20 compatible : Kaos, Igor, Jack Jackrum depends : adhoctags conflicts : similar : tabtables, tablewidth, tablelayout, tablelayout tags : html, syntax, tables downloadurl: https://github.com/saschaleib/dokuwiki-plugin-adhoctables/archive/refs/heads/main.zip bugtracker : https://github.com/saschaleib/dokuwiki-plugin-adhoctables/issues sourcerepo : https://github.com/saschaleib/dokuwiki-plugin-adhoctables donationurl: screenshot_img : https://fallacies.online/img/AdHocTables.png ---- Extends the [[plugin:adhoctags|Ad-Hoc HTML]] plugin by adding support for HTML-like //table// tags. :!: This plugin is still in an early development stage. Please test it thoroughly and report errors! ===== Installation ===== :!: **External requirements:** This plugin requires the following additional components that must be installed separately: * [[plugin:adhoctags|Ad-Hoc HTML]] Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to the latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. ===== Examples/Usage ===== This plugin allows you to create HTML tables like the following:
Heading 1Heading 2Heading 3
Row 1 Col 1Row 1 Col 2Row 1 Col 3
Row 2 Col 1Spanning two columns
Row 3 Col 1Row 3 Col 2Row 3 Col 3
Obviously, this is not very useful for such simple tables, as the same can also be achieved with simple Wiki tables, as described in the [[doku>wiki:syntax#tables|Wiki Syntax]]. It becomes interesting when you need to add additional attributes to any of the tags. You can use the attribute syntax of the [[doku>plugin:adhoctags#html_attributes|Ad-Hoc HTML]], e.g. to add class names or IDs: … Aside from class names, the main use-case for this plugin are inline styles, as in the following example:
… ===== Syntax ===== This plugin adds the following tags to the DokuWiki syntax: * '''' – [[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table|base table element]] * '''' – [[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup|table column group]], with optional attribute: * ''[span=…]'' – number of columns the group should span (integer: 1…1000) * '''' – [[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col|table column]], with optional attribute: * ''[span=…]'' – number of columns (integer: 1…1000) * '''' – [[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead|table header section]] * '''' – [[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody|table body section]] * '''' – [[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot|table footer section]] * '''' – [[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr|table row]] * ''
'' – [[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption|table caption]] * ''
'' – [[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th|table heading cell]], with optional attribute: * ''[abbr=…]'' – a short (“abbreviated”) alternative description of the cell (free-text) * ''[colspan=…]'' – number of columns the cell should span (integer: 1…1000) * ''[headers=…]'' – IDs of higher-level table header cells that this cell is related to (space-separated list of IDs) * ''[rowspan=…]'' – number of columns the cell should span (integer: 1…1000) * ''[scope=…]'' – which cells does the header cell refer to (either row, col, rowgroup or colgroup) * '''' – [[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td|table cell]], with optional attribute: * ''[colspan=…]'' – number of columns the cell should span (integer: 1…1000) * ''[headers=…]'' – IDs of table header cells that this cell is related to (space-separated list of IDs) * ''[rowspan=…]'' – number of columns the cell should span (integer: 1…1000) Note that in addition to the specific attributes, also all the general attributes from the Ad-Hoc HTML-plugin can be added. This includes: ''#id'', ''class'', '':lang'', and other extended attributes, like ''[style=…]''. ===== Configuration and Settings ===== There are currently no configuration settings for this plugin.