[pmwiki-users] Help creating a custom style?

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 1 09:50:17 CST 2005


On Wed, Jan 26, 2005 at 05:44:27PM +1100, Jonathan Smith wrote:
> At 11:25 AM 26/01/2005, Patrick R. Michaud wrote:
> Thanks very much for for the reply. My question has now expanded a little 
> as I've realised that some attributes I need to use only work on block 
> level elements.
> 
> Is there a way of defining a style that will get applied to a <p> tag 
> instead of a <span>? I understand the following example will work when 
> placed in the content
> 
> %block text-align=right% The text of this paragraph is
> right-aligned.
> 
> but what is the equivalent in the wikistyles.php file?

In wikistyles.php, the equivalent (%right%) is defined as:

   $WikiStyle['right']['apply'] = 'block';
   $WikiStyle['right']['text-align'] = 'right';

In general, if you want to administratively define a new style, it
can be done the same way, as in:

   $WikiStyle['mystyle']['apply'] = 'block';
   $WikiStyle['mystyle']['background-color'] = 'pink';

The value of the apply attribute can be any of 'block', 'list', 'item',
or 'p', to be applied to all block markups, list markups, list items,
and paragraphs.  

Pm



More information about the pmwiki-users mailing list