You are here: Foswiki>Tasks Web>Item9259 (11 Apr 2012, GeorgeClark)Edit Attach

Item9259: Tables containing headings fail to roundtrip

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.5
Target Release: patch
Applies To: Extension
Component: WysiwygPlugin
Branches: Release01x01 trunk
Reported By: PaulHarvey
Waiting For:
Last Change By: GeorgeClark
This table fails roundtrip (left as HTML - expected TML table):

<table> <tbody> 
<tr> <td> <h3> b </h3> </td> </tr> 
</tbody> </table>

It gets converted to:
<table> <tbody> 
<tr> <td>
---+++ b 
</td> </tr> 
</tbody> </table>

Expected:
| <h3> b </h3> |

This is inconsistent with list items in tables, where those are emitted as HTML.

I suppose the current behaviour was originally done so that name anchors could be generated in the viewed topic text when saved this way.

Unfortunately it complicates TinyMCETableToolsPlugin logic quite substantially - not only have I had to reproduce all the WYSIWYGPLUGIN_STICKYBITS pattern matching, but then there's this special exception (and maybe others smile

What I need to know:
  • "Fix" (allow <h1>, et. al. in tables), or
  • Document

-- PaulHarvey - 04 Jul 2010

There's another, simpler, third approach that I think I'd prefer; use the logic in WysiwygPlugin to refuse to convert a table containing a heading to TML. And document why, of course.

-- CrawfordCurrie - 08 Jul 2010

That's the current behaviour - so I guess I'll document this

-- PaulHarvey - 08 Jul 2010

I support the "document it" approach, too.

-- MichaelTempest - 08 Jul 2010

So is the fact that list items are preserved as HTML considered a bug?

-- PaulHarvey - 08 Jul 2010

With 1.1.5 / 1.2 version of WYSIWYG, this is a bit worse, and is corrupted on the 2nd edit cycle:
  1. Original table with html h3
  2. html table with tml h3
  3. tml table with non-interpreted tml h3

-- GeorgeClark - 04 Apr 2012
 
Topic revision: r13 - 11 Apr 2012, 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