Item12973: can't set cell type from "body" to "header"
Priority: Enhancement
Current State: No Action Required
Released In: n/a
Target Release: minor
There are a couple of errors with reagards to adding/removing a header to a table.
Let's start by noting that there is no option to specify the number of header rows when inserting a new table (a fault in tinymce presumably, not sure).
The real bug is that I can't change the row properties or cell properties from "body" to "header".
As a workaround a cell can be changed from "body" to "header" when adding the good old stars (*) to the cell content. After save the cell type is of type "header" as expected.
Also, a cell can be changed from "body" to "header" when making the cell content bold.
After saving a table and editing again, the text isn't of type "bold" anymore. I expected this, a normal user might not.
Now, to change it back from "header" to "body" they can't be "de-bolded" following the same strategy of the used workaround before.
Instead I click on a cell and open the cell properties dialog. There it is indicating the cell to be of type "header".
However selecting "body" to convert it back isn't taking effect all the time. Sometimes it works, sometimes not, sometimes a strange dialog pops up
displaying a warning text that I can't fully read, something I am about to do is very bad, not sure what it says nor why nor why it is bad what I am doing.
Btw adding a second header row is funny as well. I leave it to you to check that out.
This all is a major annoyance in an area where wysiwyg editors normally get their strongest justification from (tables and images).
I am totally unsure how to fix it nor if we are able to fix it within the scope of Foswiki or whether it is a Tinymce problem that we simply have inherited.
--
MichaelDaum - 25 Jul 2014
We are running an older version of TinyMCE. Release 1.1 uses 3.4.9, Trunk is on 3.5.11 But the current TinyMCE is 4.1.2. Unfortunately the API underwent major changes in 4.x and the upgrade is not simple. I tried once and failed.
The
http://tinymce.com/ has a demonstration version where you might be able to determine if the table heading behaviour is changed in the most recent version. There are some other issues that also have been fixed by the new version, but we've been unable to get them.
--
GeorgeClark - 26 Jul 2014
On trunk, Cells can be changed from data to header as follows:
- Right click on cell
- Choose
Cell -> Table Cell Properties
- Set
Cell Type
to Header
- You will get an error popup recommending to set the Scope. If you take the advice and set the Scope, then the table will not be converted back to TML on save. So ignore the error. (To improve this we could probably have the HTML2TML conversion ignore the
<th scope="... >
parameter when set.)
To change a header back to data, repeat the process. Right click cell -> Table cell properties: Set Cell type to Data. After save, the bold is removed.
Everything seems to be working fine here.
--
GeorgeClark - 26 Jul 2014
This seems to work just fine on 1.1.9 as well.
--
GeorgeClark - 26 Jul 2014
What I did was:
- click into a table cell
- click on the icon for row properties in the toolbar
- switch row type to head
- click update in dialog
- save topic
Result: no effect -> error
Can you repro this?
--
MichaelDaum - 29 Jul 2014
This might be a bug in tinymce? Setting table row properties here seems to be a nop, so I can confirm your findings. The visual row presentation doesn't change, and using the "view html" button doesn't show any change to the html row properties. That's all internal to tmce, no foswiki involvement. Given that Foswiki doesn't support row properties directly, I'm not sure how this would be supported, other than to convert the row setting to heading cells for all cells in the row.
I just tried your steps on
http://tinymce.com/ in the demo editor. Same steps, setting a row properties as a heading row has no visual effect. Setting individual cells work fine. I think this is a tmce bug.
--
GeorgeClark - 30 Jul 2014
Deferring to 1.2.1
--
GeorgeClark - 24 Apr 2015
Seems these bugs are gone in the latest TinyMCE. See demo at
http://www.tinymce.com/tryit/full.php
--
MichaelDaum - 07 May 2015
All seems good with 4.5.3
--
Main.CrawfordCurrie - 24 Mar 2017 - 16:00