This created a box (table) with individual styling. The idea came from http://www.somacon.com/p141.php and a fix from https://answers.atlassian.com/questions/24845/formatting-html-table-via-user-macro
Name | mos-box |
---|---|
Macro Body Processing | Rendered |
Code
## @param boxname:title=Box Name|type=string|required=true ## @param tablewidth:title=Table width|type=string ## @param tableheight:title=Table height|type=string ## @param tableborderwidth:title=Table border width|type=enum|enumValues=0px,1px,2px,3px,4px,5px,thin,medium,thick ## @param tableborderspacing:title=Table border spacing|type=enum|enumValues=0px,1px,2px,3px,4px,5px ## @param tableborderstyle:title=Table border style|type=enum|enumValues=none,outset,hidden,dotted,dashed,solid,double,ridge,groove,insert ## @param tablebordercollapse:title=Table border collapse|type=enum|enumValues=seperate,collapse ## @param tablebordercolor:title=Table border color|type=string|required=false ## @param tablebackgroundcolor:title=Table background color|type=string|required=false ## @param cellborderwidth:title=Cell border width|type=enum|enumValues=0px,1px,2px,3px,4px,5px,thin,medium,thick ## @param cellpadding:title=Cell padding|type=enum|enumValues=0px,1px,2px,3px,4px,5px ## @param cellborderstyle:title=Cell border style|type=enum|enumValues=none,outset,hidden,dotted,dashed,solid,double,ridge,groove,insert ## @param cellbordercolor:title=Cell border color|type=string|required=false ## @param cellbackgroundcolor:title=Cell background color|type=string|required=false ## @param mozborderradius:title=.moz Border radius|type=enum|enumValues=0px,3px,6px,9px,12px <style> #com-atlassian-confluence table.${paramboxname} { width: ${paramtablewidth}; height: ${paramtableheight}; border-width: ${paramtableborderwidth}; border-spacing: ${paramtableborderspacing}; border-style: ${paramtableborderstyle}; border-color: ${paramtablebordercolor}; border-collapse: ${paramtablebordercollapse}; background-color: ${paramtablebackgroundcolor}; } #com-atlassian-confluence td.${paramboxname} { border-width: ${paramcellborderwidth}; padding: ${paramcellpadding}; border-style: ${paramcellborderstyle}; border-color: ${paramcellbordercolor}; background-color: ${paramcellbackgroundcolor}; -moz-border-radius: ${parammozborderradius}; } </style> <table class="${paramboxname}"> <td> $body </td> </table>