]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FRichTablePlugin
Update pgsrc to 1.4.0RC1
[SourceForge/phpwiki.git] / pgsrc / Help%2FRichTablePlugin
1 Date: Fri, 10 Sep 2010 13:46:13 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0RC1)
3 X-Rcs-Id: $Id$ 
4 Content-Type: application/x-phpwiki;
5   pagename=Help%2FRichTablePlugin;
6   flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
7   markup=2;
8   charset=UTF-8
9 Content-Transfer-Encoding: binary
10
11 The **~RichTable** [[Help:WikiPlugin|plugin]] is a plugin that takes off from the [[Help:OldStyleTablePlugin|OldStyleTable]] plugin. It allows a user to specify arbitrary properties of ##<table>##, ##<tr>## and ##<td>## with a very simple markup.
12
13 The contents of each cell are individually processed by the ~BlockParser. This means that you can do interesting things like put **invoke plugins**, use **enumerated lists** etc within each cell!
14
15 * A ##"-"## (dash) at the start of a new line represents a new row in the table.
16 * A ##"|"## (vertical bar or pipe) at the start of a new line represents a cell.
17 * Attributes for the tags
18 ** A line that starts with a ##"*"## (star or asterisk) after a ##"|"## is parsed for attributes for the corresponding cell.
19 ** Attributes for the table are given on line that starts with a ##"*"##, only if the line appears before any other line except whitespace.
20 ** A line that starts with a ##-## is always parsed for attributes since it can't have any content, unlike a cell.
21 * Cell contents
22 ** Cell contents are processed by the ~BlockParser.
23 ** Any line that starts with a ##"*"## anywhere other than the table attribute line is treated as normal content.
24 ** Any line that starts with whitespace is also treated as content.
25 ** Any cell line that does not have a ##"*"## after the ##"|"## is treated as normal content.
26 ** All content lines that follow a cell line are added to that cell. They can contain arbitrary text except the above cases.
27 ** If there is no cell in the current row, content lines are dropped silently.
28 * The two special characters ##"~~"## and ##"?>"## should be escaped as ##"\~~"## and ##"?\>"##. I havn't discovered any other characters yet that might need to be escaped. This is required for the block parser to work.
29
30 We allow attributes with or without quotes (")
31 {{{
32 border=1, cellpadding="5"
33 style="font-family: sans-serif; border-top:1px solid #dddddd;"
34 style="font-family: Verdana, Arial, Helvetica, sans-serif"
35 }}}
36
37 == Example ==
38
39 <<RichTable
40
41 *border=1, cellpadding=5, bgcolor=#f0f8f8, width=75%, align=center
42 -
43 |* colspan=3, align=center
44 HomePage
45 -
46 |* colspan=2
47 [http://phpwiki.sourceforge.net/demo/themes/default/images/png.png]
48 |* rowspan=2
49 This cell actually has a plugin invocation inside it!
50 <?plugin
51 BackLinks
52 ?\>
53 - bgcolor=white
54 |
55 # One
56 # Two
57 |
58 * Foo
59 * Bar
60 - bgcolor=cyan
61 This line gets dropped ... no cell to contain it!
62 |* bgcolor=#f0f0ff, align=center
63 One paragraph
64
65 Another paragraph?
66 |* align=left
67 This cell uses the row color
68 | I wish this cell had a nested table inside it! :(
69 >>
70
71 The above table is rendered from:
72
73 {{{
74 <<RichTable
75
76 *border=1, cellpadding=5, bgcolor=#f0f8f8, width=75%, align=center
77 -
78 |* colspan=3, align=center
79 HomePage
80 -
81 |* colspan=2
82 [http://phpwiki.sourceforge.net/demo/themes/default/images/png.png]
83 |* rowspan=2
84 This cell actually has a plugin invocation inside it!
85 <?plugin
86 BackLinks
87 ?\>
88 - bgcolor=white
89 |
90 # One
91 # Two
92 |
93 * Foo
94 * Bar
95 - bgcolor=cyan
96 This line gets dropped ... no cell to contain it!
97 |* bgcolor=#f0f0ff, align=center
98 One paragraph.
99
100 Another paragraph?
101 |* align=left
102 This cell uses the row color
103 | I wish this cell had a nested table inside it! :(
104 >>
105 }}}
106
107 == Known Bugs ==
108 * The plugin can't nest itself yet. Thus nested tables are currently not possible.
109
110 == Author ==
111 * [Sameer D. Sahasrabuddhe|http://www.it.iitb.ac.in/~sameerds/phpwiki/index.php/RichTablePlugin]
112
113 <noinclude>
114 ----
115 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
116 </noinclude>