Ticket #174 (new defect)

Opened 3 years ago

Last modified 3 years ago

Table Formatting Enhancements

Reported by: jchamplin@absolute-performance.com Assigned to: developer
Priority: normal Milestone:
Component: Instiki Version: 0.10.0
Severity: normal Keywords: table formatting
Cc:

Description

My company uses instiki quite heavily and is happy to contribute time to solve some of the problems we are running into.

We would like wiki formatting for table layout with outlines, and row backgrounds. The {background:#ddd}. |asdf|asdf|asdf| does not seem to work for backgrounds when you have a table{...} tag ahead of it and usually not at all.

We tried to work around the limitation by inserting html but that has it's own challenges such as the size of the table is also the size of the empty space above the table. Attached is an example of html that causes this to happen and the type of formatting options we would like to add to instiki in support of tables.

If we are pointed in the right direction -- which files and templates need to be modified and any other relevant guidance, myself of someone on my team will get it working and submit the patch to CVS.

<pre> <table frame=box border=1 rules=all> <caption>Services Provided to XXXX</caption> <tbody> <tr align="center" bgcolor=lightgray> <th>System</th><th>OS</th><th>Services</th><th>Notes</th></tr> <tr>

<td align="left">

Error: Failed to load processor prod01
No macro or processor named 'prod01' found

</td><td>AIX 5.2</td> <td align="left">full Informix Management<br>AIX Support for Informix Storage Only</td> <td> MISSION CRITICAL SYSTEM<br>Shared Root with Byram SA</td></tr>

<tr>

<td align="left">

Error: Failed to load processor prod02
No macro or processor named 'prod02' found

</td><td>AIX 5.2</td> <td align="left">Informix DR Management<br>AIX Support for Informix Storage Only</td> <td> Informix Standby and Reporting<br>Shared Root with Byram SA</td>

</tr> <tr>

<td align="left">

Error: Failed to load processor rental
No macro or processor named 'rental' found

</td><td>AIX 5.2</td> <td align="left">Temporary, Replaces Farringdon<br>Monitoring and support rec process<br>AIX Support for Informix Storage Only</td> <td> Nightly Recovery System<br>Shared Root with Byram SA</td>

</tr> <tr>

<td align="left">

Error: Failed to load processor dev01
No macro or processor named 'dev01' found

</td><td>AIX 5.2</td> <td align="left">Ad Hoc -- No Monitoring<br>AIX Support for Informix Storage Only</td> <td> Informix Standby and Reporting<br>Shared Root with Byram SA</td>

</tr> </tbody> </table> </pre>

Change History

05/20/05 13:01:48 changed by dm1 < >

Hello,

The table syntax you describe is handled by the Redcloth library (Redcloth is the textile formating library for Ruby). To my knowlege, Instiki uses a unmodified version of Redcloth. Relevant files are in vendor/RedCloth-3.0.3 You probably want to submit a Redcloth bug or feature request here:

http://rubyforge.org/projects/redcloth/

Ciao

Denis

05/24/05 05:35:50 changed by anonymous

I found a solution -- use css tags instead of html tags -- and what appears to be a bug in the way instiki is parsing the text and handing it off to redcarpet. The following example works in http://www.textism.com/tools/textile/index.html but not in instiki:

table{border:1px solid black;empty-cells: show;border-collapse: collapse}. {background:#ddd}. |_. Row|_. 1|_. Header| |{background:#ddd; border:1px solid black }. this|{background:#ddd; border:1px solid black }. .|{background:#ddd; border:1px solid black }. row2|

The following is a working example in instiki:

table{border:1px solid black;empty-cells: show;border-collapse: collapse}. |{background:#ddd; border:1px solid black; font-weight:bold}. Row|{background:#CCF; border:1px solid black; font-weight:bold}. 1|{background:#ddd; border:1px solid black }. Header| |{background:#6CF; border:1px solid black }. this|{background:#ddd; border:1px solid black }. .|{background:yellow; border:1px solid black }. row2|

If this is indeed a bug in instiki, I'd recommend updating the docs and setting the bug priority low.