You are here: Foswiki>Tasks Web>Item5955 (29 Nov 2015, GeorgeClark)Edit Attach

Item5955: WysiwygPlugin failes to roundtrip tables that are created with align center

pencil
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: WysiwygPlugin
Branches: master
Reported By: SvenDowideit
Waiting For:
Last Change By: GeorgeClark
unfortuanatly, these tables appear to have been created in TinyMCE's popup, and then after you save, itsstored in the topic as html. This then causes the next editor to be unable to add info to any empty cells. - not nice.

see:

asdfdddd
next one empty

-- TWiki:Main/SvenDowideit - 25 Aug 2008

it also has problems with other of the table attributes you can set via the wysiwyg table popup - most of which should create a %TABLE{}% if used.

-- TWiki:Main.SvenDowideit - 31 Aug 2008

Changing this to confirmed.

No matter what you do in TMCE with tables that adds attributes to the table html tag causes the table to remain HTML instead of being converted to TML.

There are 4 scenarios I see

  1. We can ALWAYS convert to TML and ignore the tags. This is bad because sometimes you do want a more advanced HTML table in the first place
  2. We can convert attributes supported by TablePlugin to a TABLE tag placed just before the table. Attributes not supported are discarded - this requires much more advanced work and a lot of testing
  3. We can do the TABLE tag thing based on a setting in the table UI in TMCE. Again even more work.
  4. Live with it and No Action this bug. I recommend doing at least something to the most common attributes which are column widths and allignments

I do not think this is fixable within 4.2.4 scope but this is one of those that can be worked on and released as a plugin update and does not have to be deferred to 5.0.

-- KennethLavrsen - 18 Sep 2008

Kenneth's analysis is right on the money. I recognise this is a bug, but I do not believe it should be a release blocker so I'm dropping it to "Normal" status. yes, I know about the principle of least surprise, but we are on the horns of a dilemma here; keep everything, or throw everything away. Which is least surprising?

The table now survives roundtrip. I do not know what fixed it.

However, there is unusual behaviour regarding the empty cells. If I copy the table above into a topic via raw-edit, and then edit the topic with TMCE, the empty cell is not accessible. However, any of the following make the cell editable:
  • Clicking Fullscreen (and it is still editable when fullscreen is closed)
  • Opening the HTML editor and clicking Update (without making any changes)
  • Clicking WikiText followed by WYSIWYG (without making any changes)

The non-editability of empty cells looks like a bug in TMCE itself or in the TinyMCEPlugin. I suspect the plugin, so I have changed the Component.

-- MichaelTempest - 20 Nov 2009

Good find. I would rather we analysed the code that's fired in the HTML editor update button and trigger that as part of our tinymce init or tml2html conversion, instead of defaulting to fullscreen.

We can't default to fullscreen until we fix Item2285.

-- PaulHarvey - 06 Dec 2009

Hello Michael, the latest TinyMCE seems to allow access to empty cells atm - and I notice we are unable to transition tables with align="center" once more! smile Confirmed on foswiki.org (1.0.9) and current trunk.

Is there a unit test for this? Flicking back to WysiwygPlugin

-- PaulHarvey - 25 Jun 2010

Now there is a unit test (but I forgot to list the item in the svn check-in message, so I added distro:6b68d9026fd6 manually). I cannot reproduce this on trunk.

Setting this item waiting-for PaulHarvey.

-- MichaelTempest - 26 Jun 2010

Is this table meant to be converted to TML? Or stay as HTML? http://trunk.foswiki.org/Sandbox/TestTopic44465

I always thought that the only way for this to be fixed was to magically apply VarTABLE in front of any table with decorative attributes; but then you'd also have to make the operation work in the other direction too.

-- PaulHarvey - 26 Jun 2010

AFAIK, WysiwygPlugin leaves tables as HTML if there are attributes it cannot handle, so as not to destroy carefully-crafted complicated tables. Therefore, I expect the table to stay as HTML until someone adds code to handle the table tag's align attribute.

Changing to "confirmed"

-- MichaelTempest - 26 Jun 2010

Closing this task as No Action. Since TML supports a subset of HTML capabilities, there will always be table attributes that cannot be represented in TML.

-- Main.GeorgeClark - 29 Nov 2015 - 17:05

ItemTemplate edit

Summary WysiwygPlugin failes to roundtrip tables that are created with align center
ReportedBy SvenDowideit
Codebase 1.0.9, trunk
SVN Range TWiki-5.0.0, Mon, 18 Aug 2008, build 17431
AppliesTo Extension
Component WysiwygPlugin
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins distro:6b68d9026fd6 distro:91888e717503
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches master
trunkCheckins
masterCheckins distro:91888e717503
ItemBranchCheckins
Release02x00Checkins
Release01x01Checkins
Topic revision: r13 - 29 Nov 2015, GeorgeClark
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