Table of Contents
Extended List Syntax Plugin
Compatible with DokuWiki
- 2024-02-06 "Kaos" unknown
- 2023-04-04 "Jack Jackrum" yes
- 2022-07-31 "Igor" yes
- 2020-07-29 "Hogfather" unknown
Extend writing style of lists in DokuWiki; multilined items, arbitrary number of ordered items, etc.
Similar to definitionlist, yalist
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Feature
This plugin extends DokuWiki's list markup syntax to allow:
- html5 description lists, as well as ordered/unordered lists
- start any number of an ordered list and give any number for member items
- break long item into multiple lines indented by at least two spaces
- set CSS class attribute for each list block in the page
Syntax
- ordered list item (DokuWiki standard syntax) * unordered list item (DokuWiki standard syntax) ; description list term, compacted/reduced column width ;; description list term, column width is NOT reduced : description list item
Lists can be nested within lists by indenting them further, just as in the standard DokuWiki syntax.
Examples/Usage
list items in consecutive indented lines of text
Indented lines just after a list item are concatenated together with the preceding list item. You can separate a longer list item text into several lines indented by two or more white spaces,those are replaced with a single white space in the HTML output.
* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<ul class="extlist square"> <li><div class="li">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </div></li> </ul>
Make Ordered list start from number different than 1
Ordered list also starts with actual number followed by period and space (“. ”
):
100. start from hundred 105. skip 101 to 104 - continued number
<ol start="100" class="extlist hierarchical"> <li value="100" data-marker="100."><div class="li">start from hundred</div></li> <li value="105" data-marker="105."><div class="li">skip 101 to 104</div></li> <li value="106" data-marker="106."><div class="li">continued number </div></li> </ol>
additional CSS class for each list block
You can change/overwrite CSS class to be applied for the list blocks that is defined in the config settings of the plugin.
~~ul:squre~~ * Square marker ~~ul:circle~~ * Circle marker ~~ul:dash~~ * Dash marker ~~ul:disc~~ * Disc marker ~~ol:hierarchical~~ - marked 1. - marked 1.1 - marked 1.1.1
Descripton list
Lists can be nested within lists, just as in the standard DokuWiki syntax.
markup | usage | html |
---|---|---|
; | description list term, compacted column width | <dt class="compact">..</dt> |
;; | description list term, column width is NOT reduced | <dt>..</dt> |
: | description list description | <dd>..</dd> |
~~dl:generic~~ ;; Term 1 phrase wich is too long to compacted column : Description 1 of term 1 : Description 2 of term 1 * list item1 * list item2 ; Term 2-1 ; Term 2-2 ; Term 2-3 : Description of term 2 series : Tips: put **''%%<WRAP clear/>%%''** to expand column height. <WRAP clear/> ; Term 3 : Description of term 3
Note: <WRAP clear/>
is a shorthand syntax of Wrap plugin.
Configuration and Settings
You can specify additional default css class to dl/ol/ul lists.
Config key | Description |
---|---|
dl_class | css class name for description list block (default: none) |
ol_class | css class name for ordered list block (default: hierarchical) |
ul_class | css class name for unordered list block (default: square) |
Development
Change Log from github repository
- update version (2023-08-22 00:43)
- Merge pull request #11 from fiwswe/patch-2 (2023-08-22 00:32)
- Merge PR#10 (2023-08-21 18:26)
- Fix PHP Warning and optimize _tag_indent() (2022-09-08 13:07)
- Merge pull request #4 from ssahara/PSR-12 (2019-09-29 08:27)
ToDo/Wish List
FAQ
Known Bugs and Issues
This plugin doesn't work with the CKGEdit plugin. Unordered lists, ordered lists and definition lists are all clobbered in the editor window (text is duplicated, list markers are duplicated, and everything ends up on the same line). Using Greebo.
— Randy Whitaker 2019-05-28 16:01
Discussion
For anyone who is new to DokuWiki like me, if you want to make some changes to the CSS of this plugin, you need to disable and then enable it again in the extension manager to make the changes effective.
— Wayne Lin 2023-11-03