Revision [14765]
This is an old revision of SimpleTables made by TormodHaugen on 2006-07-02 16:42:42.
Simple Table markup for Wikka
See also
Test at
- my testwiki running trunk install with all SimpleTables features.
SVN
2006-06-21Patch committed to the SVN repository - to be included in 1.1.6.3:
- Ticket:230
I've hacked together a simple table markup for WikkaWiki; it is working it's way from a "layout" table markup to an accessible data table markup.
Currently it supports table header elements (<th>) and table data elements (<td>), cells spanning several columns and/or rows, table summary and caption, scope attributes for headers, table sections (<thead>, <tbody>, <tfoot>).
NOTE! Markup for tables are subject to change. Please do not invest much time in creating (advanced) tablemarkup yet!
Basic Usage
Example:
||Row 1 Column 1||Row 1 Column 2||Row 1 Column 3||
||Row 2 Column 1||Row 2 Column 2||Row 2 Column 3||
The delimiter is two pipes (||).
- Use the delimiter to start a new table, row and/or cell.
- The current row is ended with a delimiter at the end of a line.
- The table is ended by starting the next line with anything else than a new delimiter after ending a row.
"Advanced" Usage
Example:
|?This is a token summary, must be first line in table markup. PS is between single pipes!|
|!|The Caption||
|#h|
|=|First Column|=|Second Column||
|#b|
||First datacell||Second Datacell||
|2|A datacell spanning two columns||
|,2|A datacell spanning two rows||A cell on the right||
||Another cell on the right (due to previous rowspan'd cell)||
|#f|
|=|First Column|=|Second Column||
Enhanced features are enabled by putting modifiers between the pipes.
- A header cell is started with a equals sign (|=|).
- A cell span is started with numbers seperated by a comma. (|2| = colspan="2", |2,2| = col+rowspan ="2" each, |,2| = rowspan="2" only).
- An optional caption for the table can be put behind a exclamation mark'ed delimiter (|!|) and a normal delimiter. Needs to be alone on the line!
- A summary (for accessability) can be given in a delimiter started by a question mark (|?Summary|). Needs to be alone on the line, and first in the markup!
- Optional row and col scope attributes for headers can be added as |=r| and |=c|.
- Optional thead, tbody and tfoot sections are generated by adding on a separate line |#h|, |#b|, |#f|
- Each row must (still) be ended by a basic (or any, actually) delimiter.
Known Issues
Ending the table with a || delimiter without a newline adds another cell/column. (ie: if there is no more content after the table, or if there is a space after the delimiter).
Wanted
I want input on bugs/issues - and on wanted functionality / suggestion on the markup.
TODO
- better delimiters? Please advice.
- header cells Done.
- col/rowspan Done.
- caption Done.
- summary Done.
- th scope attribute Done.
- thead/tbody/tfoot Done.
CategoryUserContributions