create new tag
, view all tags

Feature Proposal: New cell span feature for EditTablePlugin


Enable users of EditTablePlugin a chance to use merged / spanned cells.

Sadly a feature implementation that was meant well turned out to have some negative side effects. But instead of giving up I will try and draft an alternative approach.

First a little more background and here I also want to refer to Bugs:Item5217 and Bugs:Item4910.

EditTablePlugin has never supported cell spans.


Header1 Header2
Spanned cell
Bottom 1 Bottom 2

The minute you add an EDITTABLE tag and edit the table and save it again, the plugin will add an empty space in the merged cell and there is a very good reason for this.

In normal use the plugin users will not want to merge cells. They have a table and it contains lots of empty cells. An example from real life. A schedule from a weekly report topic. When a milestone is in the future the date is a Forecast date. When the Milestone is reached the Forecast date is normally cleared (make no sense) and instead Actual field is populated by the actual date. The 3 column format makes the Actuals much more visible vs the forecasts. After having run with a development version of EditTablePlugin that merged empty cells for one week, the complaints came in from the users that the tables were goofed up.

Milestone Plan Forecast Actual
Blabla 1 07 Sep 2007   07 Sep 2007
Blabla 2 19 Sep 2007   19 Sep 2007
Blabla 3 09 Oct 2007   09 Oct 2007
Blabla 4 12 Oct 2007   12 Oct 2007
Blabla 5 16 Nov 2007 21 Nov 2007  

So on one hand we want the merge feature. On the other hand it creates too much trouble when it gets implemented the way TML invites to make it.

Here is another application that gets goofed up if empty cells are saved with no space between the bars. In this application (also from real life with the text made generic) an engineering team is trying to plan how many submodules they need to order for different kind of products. And the normal way is to leave a cell empty when there is 0 of an item. Especially when the product in question is not compatible with all the modules.

Project Customer Pass Type Purpose Qty Radios Controllers Hubs Tuners Hybrid Unit Cost (USD) Total Cost (USD) When (Q)
Total         6 22 5 6 10 1   34834  
Project X Engineering A PK2 Eng Test 2 4   2 2   6214 12428 Q1
Project X Factory A PC2 Fact Test 1 4   2 2   6214 6214 Q1
Project Y Eng P1 CT5 Eng Test 1 2 1     1 3502 3502 Q1
Project Y SW P1 CT5 SW Dev 2 4 2   2   6345 12690 Q1

When the user has cleared a cell and saves it with EditTablePlugin it is again important that the cell is left with one space. Otherwise we get surprising and unwanted merges again. But on the other hand it would also be nice if the cell "Total" at the bottom could be spanned across 5 columns. So even within the same table we both want and do not want cells to merge.

So after all this long talk the conclusion is

  • It would be nice to be able to work with merged cells in EditTablePlugin. And it would be nice if you saw merged cells as ONE edit field when editing.
  • We cannot just let emptied cells be stored without whitespace because that causes unwanted cell spans.

Description and Documentation

First proposal (and I expect several counter proposals)

I propose defining an extension to the EDITCELL syntax which is backwards compatible which defines a cell as merged with the one to the left. And with the possibility to merge several cells. Using span or merge as new type.

For example %EDITCELL{"span"}%.

I would imagine that the EditTablePlugin would work in two ways then.

In table editing mode it would make the cell invisible and maybe even allow the the cell to the left span.

In normal mode the variable would replace the entire cell content by nothing even removng any whitespace. Since EditTablePlugin runs before the TablePlugin it should mean that the rendering will work like normal and the cells would merge.

This can be extended to also work in the vertical direction.


  • %EDITCELL{"span"}% = span horizontally
  • %EDITCELL{"span, horizontal"}% = span horizontally
  • %EDITCELL{"span, vertical"}% = span horizontally which cause the value of the cell containing the EDITCELL to become " ^ "


The change will be an extension to EditTablePlugin only.

In Wysiwyg mode you will see the variable if implemented like this so we may consider some impact here as well to make it more beautiful. But I foresee the use of this in topics mainly edited by either developer OR user using EditTablePlugin edit mode


I think the implementation should be not too complicated since we already have the EDITCELL feature and we already substitute the EDITCELL for normal view. The most complex is if we want to actually show the cells merged in edit mode.

-- Contributors: KennethLavrsen - 08 Jan 2008


Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-01-09 - KennethLavrsen
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.