You are here: Foswiki>Tasks Web>Item12578 (29 Dec 2014, GeorgeClark)Edit Attach

Item12578: WysiwygPlugin has problems displaying tables and following content

pencil
Priority: Low
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: WysiwygPlugin
Branches:
Reported By: RobertFelber
Waiting For: RobertFelber
Last Change By: GeorgeClark
-- RobertFelber - 04 Sep 2013 The display of table and headings is not intuitive for wysiwg

Example

In Wysiwyg mode:
Heading2 Foo
Table 2 cols 2 rows
--------+-------
|content|content|
--------+-------
|content|content|
--------+-------
Heading2 Bar

Produces the following Wikitext:
---+ Foo

<table align="left" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td>content</td> <td>content</td> </tr> <tr> <td>content</td> <td>content</td> </tr> </tbody> </table>
---+ Bar

Viewing it looks like this:

Foo
--------+-------
|content|content|Bar
--------+-------
|content|content|
--------+-------

To repair the display you need to insert some linebreaks.

Reason

10:23:02 - CDot: rf1: normal, but not desireable. It's a result of the conversion from HTML back into TML.


Sorry, I can't make sense of the report; the initial text seems to include "Heading2" which morphs into "HEADING" and then into "Foo". What am I looking at? Please just give the initial topic text (raw text) plus the steps required to reproduce the error.

-- CrawfordCurrie - 04 Sep 2013

Sorry, there was a typo. The raw topic text is:
---+ Foo

<table align="left" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td>content</td> <td>content</td> </tr> <tr> <td>content</td> <td>content</td> </tr> </tbody> </table>
---+ Bar
which gets generated from the WysiwygPlugin.

The problem is that one thinks Bar will appear below the table instead it is attached to it.

-- RobertFelber - 05 Sep 2013

I've investigated this a bit, and it appears that this has nothing to do with the whitespace. it's the align="left" attribute. If that's removed from the table, the heading moves back to the new line.

It can be cleared by using a <div style="clear:both"></div> immediately following the table.

The align="left" is actually deprecated syntax, but in any event, it's equivalent to setting <table style="float:left">, and once float is enabled it has to be canceled with another style statement.

I wonder if the latest TinyMCE editor might address this.

This behaves this way, even with hand coded html, in both Firefox and Chrome, and white space makes no difference.

-- GeorgeClark - 08 Oct 2013

I've recreated this exact same behavior using http://www.tinymce.com/tryit/basic.php, which is their latest release. What are you trying to do using the align attribute? It activates a float, which is probably not what you want.

If you do need to use align=, then follow the table with the %CLEAR%, which will insert a span to clear the styles.

Changing this to No Action

-- GeorgeClark - 08 Oct 2013

"What are you trying to do using the align attribute? It activates a float, which is probably not what you want." I didn't try anything, the output came out of WysiwgPlugin. Is align="left" the standard behavior when creating a table with WysiwgPlugin? I don't remember doing anything specific to add that attribute to the table explicitly.

-- RobertFelber - 08 Oct 2013

Hm, it shouldn't be. The default should be "none" - no setting. Wysiwyg tables should end up as TML tables (vertical bar delimiters).

When you first insert a table, it opens a dialog. On my system, the default for alignment is -- Not Set --. That's what you want. This alignment is the alignment of the overall table relative to the rest of the page, and is used to cause other text to wrap around the table. If it's defaulting to "left" on your system, then it's probably some local settings in your Foswiki installation. I'd have to do some digging into TinyMCEPlugin internals to figure out how that got overridden.

To set the alignment of an individual cell, you use the cell properties, not the table properties.

-- GeorgeClark - 09 Oct 2013

No feedback and was unable to recreate. Setting to No Action.

-- GeorgeClark - 29 Dec 2014
 

ItemTemplate edit

Summary WysiwygPlugin has problems displaying tables and following content
ReportedBy RobertFelber
Codebase 1.1.8
SVN Range
AppliesTo Extension
Component WysiwygPlugin
Priority Low
CurrentState No Action Required
WaitingFor RobertFelber
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r7 - 29 Dec 2014, 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