Changes between Version 18 and Version 19 of TablePlugin/docs
- Timestamp:
- Jul 23, 2015, 2:08:34 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TablePlugin/docs
v18 v19 3 3 = TablePlugin Documentation = 4 4 5 TablePlugin uses a similar style to the FlatTableMacro that was originally developed. The inspiration for the TablePlugin originated from the FlatTableMacro. A number of issues where present with the FlatTableMacro, such as no wiki formatting support amongst other things.5 TablePlugin provides improved legibility and syntax for building up complex tables within a wiki. The headings and rows are now defined in the same way. This improves legibility, even for very complex tables that can be defined using the TablePlugin. 6 6 7 TablePlugin provides improved readability and syntax for building up complex tables within a wiki. The headings and rows are now defined in the same way, 8 this helps with the readability aspect, even for very complex tables that can be defined using the TablePlugin. 7 Key features: 8 - Lists 9 - Wiki Markup 10 - HTML 11 - Web links 12 - Nesting (including nesting of the TablePlugin itself) 13 - Full CSS support (fully customisable heading and row cells) 14 - Flexible heading/column definition styles, multi-line or comma-separated 9 15 10 The TablePlugin supports the following items within the cells: 11 - Lists 12 - Wiki Markup 13 - HTML 14 - Web links 15 - Nesting (including nesting of the TablePlugin itself) 16 - Full CSS support (fully customisable heading and row cells) 17 - Flexible heading/column definition styles, multi-line or comma-separated 18 - etc... 16 This plugin was inspired by FlatTableMacro. A number of issues where present with that macro, including lack of support for wiki formatting. 19 17 20 == Keywords ==18 == Keywords 21 19 22 There are a number of keywords that are used within the TablePlugin macro that define variouselements of the table. The keywords are preceded with the @ character to distinguish them.20 There are a number of keywords that are used within the TablePlugin macro that define the elements of the table. The keywords are preceded with the @ character to distinguish them. 23 21 24 22 The keywords: 25 26 27 28 29 23 - @table - used when you want to define a table style or apply a custom table style to a new table. 24 - @css - used to define a new style 25 - @column - used to introduce a column. 26 - @row - used to introduce a row 27 - @<cell_name> - named as part of the @column definition. 30 28 31 29 The last keyword `@<cell_name>` is variable. It is based on the names you give the cells in your @column definition. This is covered in more detail below in the Table Definition section. 32 30 33 == Table Definition ==31 == Table Definition 34 32 35 33 The following example will not focus on any types of styles. The TablePlugin provides a default style (which can be edited if required) that will always be used if no specific style is applied to the table. We will focus on the bare minimum markup required to setup a new table. Comments are included as part of the codeblock to further explain the markup and how to use it. … … 92 90 [[Image(table_example2.png)]] 93 91 94 == Table Styles ==92 == Table Styles 95 93 96 The table styles are stored as part of a trac page. This trac page should be setup by the TablePlugin the first time it runs. It creates a page `wiki/TablePluginStyles` that contains a default table style along with a CSS header style for the tables heading.94 The table styles are stored as part of a Trac page. This Trac page should be set up by the plugin the first time it runs. It creates a page `wiki/TablePluginStyles` that contains a default table style along with a CSS header style for the tables heading. 97 95 98 96 There are two different types of styles: 99 100 97 - Table Styles 98 - CSS Styles 101 99 102 Both styles use the following naming conventions: `@TYPE NAME (@STYLE): DATA` 100 Both styles use the following naming conventions: `@TYPE NAME (@STYLE): DATA`. 103 101 104 102 Table Styles define a full set of styles that can be applied to a table. They are written in CSS. … … 127 125 128 126 This @header style can then be applied to any of the following elements: 129 130 131 127 - @row 128 - @column 129 - @<cell_name> 132 130 133 In the above example, we could do the following to the first row (which corresponds to the header). The other data has been omitted for brevity.131 In the above example, we could do the following to the first row, which corresponds to the header. The other data has been omitted for brevity. 134 132 135 133 {{{ … … 148 146 This will now enforce centering of the text along with making it bold for that entire row of data. Any other valid CSS can be used here as well. For example, `background: green;` could also be added to make the header cells background green. 149 147 150 == Usage ==148 == Usage 151 149 152 150 The TablePlugin will parse all styles from the !TablePluginStyles wiki page so that they can be used to style any of the elements. 153 151 154 It is also possible to create custom styles within the actual table definition as well. Although this can get quite messy and unreadable and it is recommended that the !TablePluginStyle wiki page be used to house all of the styles.152 It is also possible to create custom styles within the actual table definition as well. Although this can get quite messy and unreadable and it is recommended that the !TablePluginStyle wiki page be used to accommodate all of the styles.