This question about Missing functionality: Answered

Is there any way to set the background colors of specific table cells?

We'd like to be able to specify background (and foreground) colours for particular table cells. For example, in a table of search results, colour a single cell in each row to represent the type of item that row represents - e.g. Red for fail, Green for pass.

I saw the answer to a previous question where you can specify the background colour for a particular row or column, but what about a single cell? Is there some reasonably easy way to do this that I'm missing?

We can, of course, write our own HTML tables or use the MediaWikiTablePlugin to get this kind of functionality - but it would be great to have this kind of functionality available in TablePlugin in some sort of reasonably easy to use form.

-- LeilaPearson - 30 Mar 2011

For Trademark wiki there ones had been an Coloring Extension for TablePlugin, but this hasn't been ported to Foswiki world yet and wasn't supported back there very well. Would need some TLC by an experienced/ambitious developer, cause the TablePlugin evolved pretty much since 2002 and as a core plugin it must not be harmed in its basic functions. A plugable extension that works fine with all table related plugins (EditTablePlugin, EditRowPlugin, and potentially others) would be fine. This feature request comes back from time to time. --> This questions should be followed by/converted to an enhancement request which then will (hopefully) find its developers.

-- FranzJosefGigler - 31 Mar 2011

Thanks for the response Franz. I wasn't aware of the Coloring Extension. That could be a nice starting point for adding this feature to Foswiki. It's an interesting approach to the problem. I wasn't sure how per-cell coloring could be accomplished using just arguments in the TABLE macro. I was assuming - if the feature was implemented - it would require some sort of formatting text in the cell itself and if the colour was conditional on the cell value, you'd use an IF statement. Sticking with just TABLE arguments simplifies implementation quite a bit I think, and seems like a pretty tidy way to go. Marking the question as answered.

-- LeilaPearson - 31 Mar 2011

QuestionForm edit

Subject Missing functionality
Extension TablePlugin
Version Foswiki 1.0.9
Status Answered
Topic revision: r3 - 31 Mar 2011, LeilaPearson
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy