Style Macro (Radeox)

Last modified by Vincent Massol on 2016/06/05 22:11

Styles a block of content.

Internally it generates an HTML DIV or SPAN and supports many properties of these 2 elements.

The style macro be a superset of the existing info, warning, error and floatingbox macros. We need use some class match with those macros

Usage

{style:type=<div|span>|id=<id>|class=<class>|align=<align>|font-size=<size>|color=<color>|font-family=<font>|width=<width>|height=<height>}text{style}

Parameters definition

Supported properties (note that all of them are properties that exist for DIVs and SPANs):

  • id : id of span of div tag
  • class (some classes: warningmessage,errormessage, infomessage, plainmessage, floatinginfobox,... matching with warning, error, info ... macros)
  • name
  • align : allow align a paragraph to left, center, right, full
  • font-size
  • font-family
  • color
  • background-color
  • width
  • height
  • float
  • border
  • icon and document

 ({style...|icon=msgwarning.jpg|document=Main.Mypage} if the document parameter is specified then it find msgwaring.jpg in attachments of Main.Mypage or current page or in icons directory , If it isn't found then it display image empty for icon

Example

{style:type=div|color=red|width=50%|height=50%}
This is the content in div block
{style}

Will generate the following when rendered:

<div style="color:red;width:50%;height=50%">
  This is the content in div block
</div>

or 

{style:type=div|border=1px solid red|background-color=green|width=300px|height=300px|color=red|
icon=msgwarning.png|document=Main.Mypage}
This is the content of style macro
{style}

Result

This is the content in div block

or

stylemacro.JPG

Get Connected