[Home]TextFormattingRules/WikiTables

UseModWiki | TextFormattingRules | RecentChanges | Preferences

Example Wiki Table

Column AColumn BColumn C
Entry for row 1, Column AEntry for row 1, Column BEntry for row 1, Column C
Entry for row 2, Column AEntry for row 2, Column BEntry for row 2, Column C
Spanning entry Entry for row 3, Column C
More spanning

The above table is achieved with the following:

||'''Column A'''||'''Column B'''||'''Column C'''||
||Entry for row 1, Column A||Entry for row 1, Column B||Entry for row 1, Column C||
||Entry for row 2, Column A||Entry for row 2, Column B||Entry for row 2, Column C||
||||Spanning entry|| Entry for row 3, Column C ||
||||||More spanning||


Text alignment

Currently there is no way to align text left or right within a table cell. Text is always centered.

If the centering is driving you mad, you can easily make it align left instead. change your wiki.pl. Near line 1718 (on my version; yours may vary), there is code like this:

             s/^((||)+)(.*)||s*$/"<TR VALIGN='CENTER' "
                                      . "ALIGN='CENTER'><TD colspan='"
                               . (length($1)/2) . "'>$3</TD></TR>
"/e) {

change the ALIGN='CENTER' to ALIGN='LEFT' and all your tables will be left-aligned (This doesn't give user control on a per-table basis)

Install the TableFormatting wiki patch to refine this feature, including allowing full user control of justifying/centering.


Comments

So you can have cells span horizontally, but not vertically? Would be cool if that could be improved.

---

In the meantime, try this patch: WikiPatches/TableRowSpan -- Michael Rienstra 2006-02-13


How come you are no longer allowed to use <TABLE> tags at all. Seems a shame. I guess the advantage is it keeps the markup looking cleaner and non-technical. And maybe there was ways of abusing <TABLE> tags.

I designed the boxes on the [HomePage of KayakWiki], and was quite pleased with the results. This uses <TABLE> tags with STYLE attributes. I don't know what version of usemod kayakwiki uses (I am just a kayakwiki user), but I guess if kayakwiki was upgraded then the homepage would have to go back to looking drab again :-( -- HarryWood - 20th January 2005


You can still use the table tags, but you must place the code within an <HTML></HTML> block, and you must enable the use of inline raw HTML code in the wiki.pl code.

    wiki.pl:

    ...
    $RawHtml = 1; # around line 120
    ...

    Your wiki page:

    <html>
        <table>
        ...
        </table>
    </html>

-- 2005-02-13


UseModWiki | TextFormattingRules | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited July 2, 2010 11:31 pm by 94.76.168.219 (diff)
Search: