Zuletzt angesehen: • Bestimmung des Gesamtauswaschverlustes und der Gehalte an auswaschbaren organischen und anorganischen Stoffen aus Leder • Übersicht Prozess Fettung • Wrap Plugin
Wrap Plugin
—- 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.
Examples
The plugin comes with an example page, which should explain a lot and looks like this in the default template:
Syntax
Basic Syntax:
<WRAP classes width :language> "big" content </WRAP>
An uppercase <WRAP> creates a div and should be used for „big“ containers, surrounding paragraphs, lists, tables, etc.
<wrap classes width :language>"small" content</wrap>
A lowercase <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.
Classes
The following classes are currently available:
| class name | description/notes |
|---|---|
| columns – similar to columns, side_note, styler, tip | |
column | same as left in LTR languages and same as right in RTL languages |
left | same as column, will let you float your container on the left |
right | will let the container float right |
center | will position the container in the horizontal center of the page |
alignments – similar to divalign, columns, styler – <wrap>s! |
|
leftalign | aligns text on the left |
rightalign | aligns text on the right |
centeralign | centers the text |
justify | justifies the text |
| boxes and notes – similar to box, note, tip | |
box | creates a box around the container (uses colours from style.ini) |
info (was information in first version) | creates a blue box with an info icon |
important | creates an orange box with an important icon |
warning | creates a red box with a warning icon |
tip | creates a yellow box with a tip icon |
help | creates a violet box with a help icon |
todo | creates a cyan box with an todo icon |
download | creates a green box with a download icon |
round | 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 | |
hi | marks text as highlighted |
lo | marks text as less significant |
em | marks text as especially emphasised |
| typography (not recommended) – similar to typography, styler, color, fontcolor, highlight, fontsize, fontsize2, fontfamily | |
sansserif, serif, monospace | changes the font family |
bigger, muchbigger, smaller | changes the font size |
fgred, fggreen, fgblue, fgcyan, fgviolet, fgyellow, fggrey, fgwhite, fgblack | changes the font colour |
bgred, bggreen, bgblue, bgcyan, bgviolet, bgyellow, bggrey, bgwhite, bgblack | changes the background colour |
| miscellaneous | |
clear | similar to clearfloat, should preferably be used with divs, i.e. uppercase <WRAP>s |
hide | hides the text per CSS (the text will still appear in the source code, in non-modern browsers and is searchable) |
pagebreak | forces a new page in printouts (not visible on the screen), similar to pagebreak |
spoiler | shows white text on a white background, only to be revealed by highlighting it; similar to hide |
indent | indents the text, could be used instead of tab |
outdent | „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.
Known restrictions
- 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.
clearorhide.) - 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 hi, lo and em if you have a dark or otherwise heavily coloured theme.
The classes are easily adjustable and extensible. Any wishes are welcome.
Widths
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>...
Languages and Text Directions
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.
Sie befinden sich hier: start » intern » Wrap Plugin


