[pmwiki-users] feature request for simple table

Patrick R. Michaud pmichaud at pobox.com
Wed Apr 13 17:04:38 CDT 2005


On Wed, Apr 13, 2005 at 05:28:22PM +0200, Knut Alboldt wrote:
> would it be possible to add another attribute to the simple table 
> formatting markup (|| attrib=xxx) ?
> 
> I'd like to have one for defining minimum cell width, e.g. 
> cellwidth=200px which then shall add a style="width:200px" to all 
> td-tags which are generated by the simple-table-markup.
> 
> I haven't seen any possibility to do this by using markups or setting 
> global variables I think I have to change FormatTableRow in pmwiki.php 
> which I really don't want to :-)
> 
> Is there another way to get this ?

Way #1:  In config.php, add

    $HTMLStylesFmt['mincellwidth'] = 
      ' table.mincellwidth td { width:200px; } ';

then in the markup you can do:

    ||class='mincellwidth'

Of course, you could place the CSS into pub/css/local.css instead of
the $HTMLStylesFmt array.


Way #2:  

    $TableCellAttrFmt = 'style="width:200px"';

adds style="width:200px" to every <td> or <th> cell generated within a 
simple table.

Pm



More information about the pmwiki-users mailing list