This page provides an example to make enforce user-defined styles persist for in columns. For this example, let's consider the Monthly Temperatures Table, for which you want to set background colors and borders of various columns , and auto-number all the rows.
Select this macro
Macro name | Table Plus |
Macro syntax (Old editor) | {table-plus} |
Macro syntax (New editor - case insensitive) | /Table Plus |
Define these parameters/values
Column settings > Formatting > Column Styles (1 2 3 4) | Auto number on each row | On |
Column styles (Comma separated styles) | Column settings > Numbering & Totaling > border:5px solid #c1c7d0;background:lightgrey;padding:15px; background:lightblue; color:teal , background:lightgreen;color:red;font-size: 160%, background:lightyellow;border: 3px dotted green; 2 | |
Column settings > Numbering & Totaling > Insert auto number column | On | |
Column settings > Numbering & Totaling > Auto number column styles | border: 5px solid #c1c7d0; | |
, 2 | ||
Apply Column styles to data column cells | On |
Note |
---|
Observe that column 1 styling is repeated in column 4, but, value 2 is used instead of 1. This is because Insert auto number column in On. |
Screenshots
Parameters set in the macro editor
Example result
When the Apply Column styles to data column cells is offdisabled, certain styles like the padding and the text color are not applied due to the existing default Confluence styles as shown:
When the Apply Column styles to data column cells is toggled onenabled, the table is displayed with all the specified styles after overriding the default Confluence styles as shown: