Item5955: WysiwygPlugin failes to roundtrip tables that are created with align center
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
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:
--
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
- 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
- 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
- We can do the TABLE tag thing based on a setting in the table UI in TMCE. Again even more work.
- 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!
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