My users are constantly complaining that editing with Wysiwyg "destroys" their tables.
I have found that almost all the case is the same simple problem which I think cannot be too difficult to fix.
The problem is that text which is born left aligned ends up right aligned and the condition is always the same.
In TML a table cell with one space on the left and zero spaces on the right are shown left aligned. It requires two spaces on the right to give center or right aligned.
The Wysiwyg editor ads additional white space when you edit a topic. It even adds it when you pickaxe from Wysiwyg to raw. And in all cases except one this is OK and compatible and leaves a nice uniform way to represent the data in the cell.
The problem case is one space to the left and zero to the right. This gets converted to two spaces to the left and one to the right and then it is right aligned instead of left aligned. The conversion happens already when you edit the topic, not when you save.
If the behaviour is changed so 1+0 becomes 1+1 instead of 2+1 then many people will be much more happy with the Wysiwyg editor.
To see the problem look at the table below. First in verbatim. Then in real life. When you edit and save with wysiwyg the row 1+0 is the only one that gets wrong.
To repeat the test case after someone has tried simply edit the topic raw, copy the text from the verbatim block, save, and try editing and saving in normal Wysiwyg mode.
If this can be fixed for 4.2.0 it will have great positive impact in the reception of the new editor. So allow me to set it urgent to get is visible on bugs. If it turns out to be difficult to fix then I am OK to defer to 4.2.1.
| *Left* | *Right* | *Sample text to see alignment* | *Behavior* |
| 0 | 0 |Sample text| Left |
| 0 | 1 |Sample text | Left |
| 0 | 2 |Sample text | Left |
| 1 | 0 | Sample text| Left |
| 1 | 1 | Sample text | Left |
| 1 | 2 | Sample text | Left |
| 2 | 0 | Sample text| Right |
| 2 | 1 | Sample text | Right |
| 2 | 2 | Sample text | Center |
Left |
Right |
Sample text to see alignment |
Behavior |
0 |
0 |
Sample text |
Left |
0 |
1 |
Sample text |
Left |
0 |
2 |
Sample text |
Left |
1 |
0 |
Sample text |
Left |
1 |
1 |
Sample text |
Left |
1 |
2 |
Sample text |
Left |
2 |
0 |
Sample text |
Right |
2 |
1 |
Sample text |
Right |
2 |
2 |
Sample text |
Center |
--
TWiki:Main.KennethLavrsen
- 08 Jan 2008
I'd rather have that Crawford spends time on the merge bug than this one which was trivial to fix.
So I stepped in a checked in a fix.
Carefully tested. Also unit tests pass. Closing.
--
TWiki:Main.KennethLavrsen
- 09 Jan 2008