%%tab-TableSyntax ! Basic markup The table plugin is compatible with the standard JSPWiki table syntax : * a new line of text starting with a pipe sign '|' indicates the start of a new table row. * every line corresponds with a horizontal row of the table, containing one or more table cells. ** a single pipe signs ('|') starts a new data cell. ** a double pipe signs ('||') starts a header cell with different formatting. * end the table with a line which does not start with a pipe sign. ! Extended markup Following syntax is also supported: * use '|<' or '||<' to collapse a cell with the previous cell so it __spans multiple columns__. * use '|^' or '||^' to collapse a cell with the cell above so that it __spans multiple rows__. * use '|( <css-style> ) ' to add specific __formatting__ to a cell. * use '#' inside a table cell to display the current row number. (__auto row numbering__) Example: {{{ |Nr |A |< |C |< |# |a |b |c |(background:yellow;)d |# |^ |b |^ |(background:yellow;)d }}} becomes (simulated) {{ +----+-------+-------+\\ | Nr | A | C |\\ +----+---+---+---+---+\\ | 1 | a | b | c |%%(background:yellow;) d %%|\\ +----+ +---+ +---+\\ | 2 | | b | |%%(background:yellow;) d %%|\\ +----+---+---+---+---+\\ }} ! Multi-line table editing The standard table markup of JSPWiki requires you to put every row on a single line without carriage returns. With the Table plugin, a single ''table row'' and even a single ''table cell'' can be entered on multiple lines. A multi-line ''table row'' is similar to a bulleted list, where you replace the bullets ('*') with pipes ('|' or '||'). A blank line indicates the end of a table row. {{{ | These cells | will all appear | as a single table row }}} It is also possible to put the contents of a single ''table cell'' across multiple lines. So it is easy to put lots of text and markup inside a single table cell and still keep your markup readable. {{{ | This cell is put over 2 lines | The 2nd cell comes here }}} You can combine muti-line rows with standard wiki table syntax too. As long as a single line contains only one table cell, it is assumed to continue on the next line. Multi-line rows always need to be terminated with blank lines; for standard wiki table rows you may omit the blank lines. {{{ | This row has | Two cells | You can also | use standard wiki markup. | Here is another | table row }}} Of course, you can combine this multi line syntax with the '|<', '|^' and '#' stuff as well. Example: {{{ || Heading 1 || Heading 2 | ''Gobble'' starts a new row! * and some more text with wiki markup, all in the same table cell |(background:yellow;) Bar | [{Image src='some-nice-picture'}] |< }}} %% [{Table |Nr |A |< |C |< |# |a |b |c |(background:yellow;)d |# |^ |b |^ |(background:yellow;)d }] [{Table oddRowStyle='background:#f0f0f0;' rowNumber='-1' || [THE 15 MOST POPULAR ICE CREAM FLAVORS|http://www.sendicecream.com/15mospopicec.html] ||< ||< || ||Flavor|| percent preferring |#. |Vanilla| 29% |#. |Chocolate| 8.9% |#. |Butter pecan| 5.3% |#. |Strawberry| 5.3% |#. |Neapolitan| 4.2% |#. |Chocolate chip| 3.9% |#. |French vanilla| 3.8% |#. |Cookies and cream| 3.6% |#. |Vanilla fudge ripple| 2.6% |#. |Praline pecan| 1.7% |#. |Cherry| 1.6% |#. |Chocolate almond| 1.6% |#. |Coffee| 1.6% |#. |Rocky road| 1.5% |#. |Chocolate marshmallow| 1.3% |All others|< | 23.7% }] Source: International Ice Cream Association, 888 16th St. Washington, D.C., 20006 [{Table style='border:3px solid #cccccc;' |(text-align:center;font-weight:bold; background:#cccccc;) Hi dear Wiki. |< |< | Date: [{CurrentTimePlugin format='dd:MMM:yyyy'}] | Time: [{CurrentTimePlugin format='hh:mm:ss'}] | This page: [{$pagename}] | [{Table | Nested table | Nested table | Nested table | Nested table }] |< |< }]