phpgtk__legacy/wiki1/wikilib.d/PmWiki.WikiStyles

10 lines
3.4 KiB
Text

version=pmwiki-0.6.18
newline=²
text=WikiStyles allow an author to modify the color and other attributes of text that follow. A style specification such as @@[=%red%=]@@ will cause the following text to be displayed as red until the end of the line or the next pair of percent signs. For example:²² [=%red%=] This text is red and [=%blue%=] this text is blue [=%%=] but ² this text is normal.²²gives²²->%red% This text is red and %blue% 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 (%newwin%[[WikiStyles example]]), and standard text colors such as [=%black%, %white%, %red%, %green%, %blue%, etc.=]²²!!Creating new styles²²Placing @@color@@, @@bgcolor@@, or @@target@@ specifications inside of a pair of percent signs will change the style of the following text to use those colors up to the end of a line or until the next pair of percent-signs. For example:²² [=%color=red% This text is red and %color=blue% this text ² is blue %% but this text is normal. =]²²renders as²²->%color=red% This text is red and %color=blue% this text is blue %% but this text is normal.²²One can also change the background color using the @@bgcolor@@ attribute:²² [=%color=white bgcolor=green% This text is white on green %color=green% and² this is green on white. =]²²->%color=white bgcolor=green% This text is white on green %color=green% and this is green on white.²²One can specify that links should open in a new window via the @@target@@ attribute:²² [=%target=_blank% Any links on this line like http://www.pmichaud.com ² will open in a new window. =]²²which gives²²->%target=_blank% 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²%define=hotpink color=#ff69b4%²%define=reverse color=white bgcolor=black%²²Wiki authors can also make their own {{WikiStyle|s}} definitions within a document using the @@define@@ attribute. For example, the statement²² [=%define=hotpink color=#ff69b4%=]²²will cause the markup @@[=%hotpink%=]@@ to be a shortcut for @@[=%color=#ff69b4%=]@@ (%hotpink%like this%%). One can specify multiple items in a definition, as in²² [=%define=reverse color=white bgcolor=black%=]²²which allows @@[=%reverse%=]@@ to cause %reverse%reverse video%%, and @@[=%reverse hotpink%=]@@ to be the %reverse hotpink%combination of both shortcuts%%. ²²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|s}} -- see WikiStylesAdmin.²²!!Predefined styles²²See {{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.²²!!Colors²For some examples of colors, see WikiStyleColors²²%trail% <<|PmWiki.DocumentationIndex|>>²²²
time=1084212709
host=24.1.44.14
agent=Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
rev=35
post= Save
author=Pm
name=PmWiki.WikiStyles