• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5220: Wysiwyg alters table alignment in specific condition.

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension WysiwygPlugin Urgent Closed   minor 4.2.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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

ItemTemplate
Summary Wysiwyg alters table alignment in specific condition.
ReportedBy TWiki:Main.KennethLavrsen
Codebase 4.2.0, ~twiki4
SVN Range TWiki-4.3.0, Sun, 30 Dec 2007, build 16120
AppliesTo Extension
Component WysiwygPlugin
Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:16174 TWikirev:16175
TargetRelease minor
ReleasedIn 4.2.0
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-01-09 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback