Bug #105644
openCKEditor 5: Table handling issues
0%
Description
I noticed some weird behaviour with tables in CKEditor 5:
1) Changing a row with TDs to THs:
Insert his into a RTE field, then try to make the 3rd row a TH using the row (Table options > row > header):
<figure class="table">
<table>
<thead>
<tr>
<th>
TH
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
TD
</td>
</tr>
<tr>
<td>
TH
</td>
</tr>
<tr>
<td>
TD
</td>
</tr>
</tbody>
</table>
</figure>
This results in the second row also becoming a TH. Reverse that with the header toggle, and the third row becomes a TD again, while the second row remains a TH.
All those rows are moved to <thead>.
Changing the TD to a TH manually in the source view also moves the row into <thead>.
2) Changing tables that were last saved under CKEditor 4 (TYPO3 11):
We have some long tables which have THs in the first row and also a few rows further down for better readability (similar to the first example). When you open the content element the table is already "rebuild", because the RTE moved all the TH rows to the top (inside <thead>), completely changing the look and meaning of the table.
Is this how tables should be used if you "adamantly stick to HTML standards", or does CKEditor go too far with this?
My RTE config for tables:
editor:
config:
table:
defaultHeadings: { rows: 1 }
contentToolbar:
- tableColumn
- tableRow
- mergeTableCells
- tableProperties
- tableCellProperties
- toggleTableCaption
Files
No data to display