|
|
|
WikiStyles allow an author to modify the color and other attributes of text that follow. A style specification such as %red% This text is red and %blue% this text is blue %% but this text is normal. gives This text is red and this text is blue but this text is normal.
The set of predefined wiki styles? is customizable by the WikiAdministrator. Most PmWiki systems define %newwin% to cause links to open in a new window (example), and standard text colors such as %black%, %white%, %red%, %green%, %blue%, etc. Creating new stylesPlacing %color=red% This text is red and %color=blue% this text
is blue %% but this text is normal.
renders as This text is red and this text is blue but this text is normal.
If one wants the formatting to continue past the end of the line, there are a couple options one can use (found here). For example, using %block color=red% will continue the formatting until it gets to to the end of the current block/paragraph. For example: This is some text %block color=red% that is being colored red by the wikistyle in the line. This is some text that is being colored red by the wikistyle in the line. The other options (according to the e-mail) are: A brief explanation of the difference between item, list, and blockApply=block applies to any sort of block markup, such as paragraphs, lists, indents, and list items. Apply=list applies to an entire list -- i.e., anything that generates a <dl>, <ol>, or <ul> tag. Apply=item applies only to an individual list item (<li>, <dd>, <dt>). So given the markup * %apply=XXX border='1px solid black'% First * second * third * First
* second
* third
if XXX is 'item' (as in 'apply=item'), then only the first bullet item will have a box around it. If XXX is 'list', then the entire bullet list will be placed in a box. And if XXX is 'block', then the bullet list will be placed in a box, as well as the first list item (because 'block' covers both). One can also change the background color using the %color=black bgcolor=green% This text is black on green
%color=green bgcolor=black% and this is green on black.%%
This text is black on green and this is green on black. One can specify that links should open in a new window via the %target=_blank% Any links on this line like http://www.pmichaud.com
will open in a new window.
which gives Any links on this line like http://www.pmichaud.com will open in a new window.
Finally, WikiStyles can control the width and height of ImagesInWikiPages, thus the markup %height=50% http://www.example.com/some.gif will display some.gif scaled to a height of 50 pixels. Style definitions
Wiki authors can also make their own WikiStyle definitions within a document using the %define=hotpink color=#ff69b4% will cause the markup %define=reverse color=white bgcolor=black% which allows It's often a good idea to put common style definitions into GroupHeaders so that they can be shared among multiple pages in a group. Or, the WikiAdministrator can predefine styles as a LocalCustomization -- see WikiStylesAdmin?. Predefined stylesSee predefined wiki styles? for a description of the WikiStyles that are defined in a standard installation of PmWiki. That page also describes how an administrator can predefine additional WikiStyles. ColorsFor some examples of colors, see WikiStyleColors? << Uploads | PmWiki.DocumentationIndex | WikiStyleExamples >> |