—- plugin —- description: Universal plugin which combines functionalities of many other plugins. Wrap wiki text inside containers (divs or spans) and give them a class (choose from a variety of preset classes), a width and/or a language with its associated text direction.
The plugin comes with an example page, which should explain a lot and looks like this in the default template:
<WRAP classes width :language> "big" content </WRAP>
<WRAP> creates a
div and should be used for „big“ containers, surrounding paragraphs, lists, tables, etc.
<wrap classes width :language>"small" content</wrap>
<wrap> creates a
span and should be used for „small“ containers, inside paragraphs, lists, tables, etc.
Please note, some things won't work with lowercase
<wrap>s: alignments (including alignments generated by changing the text direction) and widths if the according wrap isn't floated as well.
The following classes are currently available:
|columns – similar to columns, side_note, styler, tip|
| same as
| same as
|will let the container float right|
|will position the container in the horizontal center of the page|
|alignments – similar to divalign, columns, styler – don't work with spans, i.e. lowercase
|aligns text on the left|
|aligns text on the right|
|centers the text|
|justifies the text|
|boxes and notes – similar to box, note, tip|
| creates a box around the container (uses colours from
|creates a blue box with an info icon|
|creates an orange box with an important icon|
|creates a red box with a warning icon|
|creates a yellow box with a tip icon|
|creates a violet box with a help icon|
|creates a cyan box with an todo icon|
|creates a green box with a download icon|
|adds rounded corners to any container with a background colour or a border (only works in modern browsers, i.e. no IE)|
|marks – similar to hilited, emphasis, important_paragraf, important_text|
|marks text as highlighted|
|marks text as less significant|
|marks text as especially emphasised|
|typography (not recommended) – similar to typography, styler, color, fontcolor, highlight, fontsize, fontsize2, fontfamily|
|changes the font family|
|changes the font size|
|changes the font colour|
|changes the background colour|
| similar to clearfloat, should preferably be used with divs, i.e. uppercase
|hides the text per CSS (the text will still appear in the source code, in non-modern browsers and is searchable)|
|forces a new page in printouts (not visible on the screen), similar to pagebreak|
|shows white text on a white background, only to be revealed by highlighting it; similar to hide|
|indents the text, could be used instead of tab|
|„outdents“ the text, could partly be used instead of outdent|
All tables inside a column or box will always be 100% wide. This makes positioning and sizing tables possible and partly replaces tablewidth.
- The PNG icons for the various notes have an alpha transparency which will look ugly in IE6.
- Round corners only work in modern browsers (no IE).
- After an opening <WRAP> there is one empty line needed before the content, or else there won't be any paragraph, which might lead to unexpected results. (Wraps without a visible content don't need any additional empty lines, e.g.
- Normal DokuWiki Headlines won't work inside any plugin syntax. As a work-around you can use the following two emulated headlines inside any of the columns or boxes/notes:
- //**__Big Underlined Headline__**//
- //**Small Headline**//
You probably need to adjust a few of the classes to your template's needs, especially
em if you have a dark or otherwise heavily coloured theme.
The classes are easily adjustable and extensible. Any wishes are welcome.
You can set any valid widths on any uppercase <WRAP> container:
%, px, em, ex, pt, pc, cm, mm, in. Just set the width before or after or with the classes, e.g.
<WRAP someclass 50% anotherclass>...
You can change the language and the direction of a container by simply adding a colon followed by the language code, like this:
<wrap :en>This text is explicitly marked as English.</wrap>
The text direction (
rtl, right to left or
ltr, left to right) will get inserted automatically and is solely dependent on the language. The list of currently supported languages is taken from: http://meta.wikimedia.org/wiki/Template:List_of_language_names_ordered_by_code
If you like to mark a text with a different text direction than the default one, you should use divs, i.e. uppercase
<WRAP>s. Otherwise the text alignment won't change as well.