Steps to reproduce:
Create a table with 2 rows.
Set the top row to be a header row.
Retrieve the value of the ditor using editor.getData()
Initialize a new editor, and set the value using editor.setData()
Both rows in the table are now set to be header rows even though the first row uses th and the second row is using td. When focussing on the editor the value of the editor will update and change td's to th's
I'm using (what I think is) the latest version "@ckeditor/ckeditor5-build-decoupled-document": "^11.0.1",
Edit
Which seems to be using "@ckeditor/ckeditor5-table": "^10.1.0",
@JiFus could you paste the value you get from editor.getData()?
<figure><table><tr><th>df</th><th>df</th></tr><tr><td>df</td><td>df</td></tr></table></figure>
OK as for setData() the value you've pasted is a special case of: https://github.com/ckeditor/ckeditor5-table/issues/17. The header row/column detection is not perfect if the <table> doesn't contain <thead> section. The row in <tbody> (or <tr> in <table> directly) with only <th> elements will be detected as heading columns.
The second thing is that editor should return:
"<figure class="table"><table><thead><tr><th>df</th><th>df</th></tr></thead><tbody><tr><th>df</th><th>df</th></tr></tbody></table></figure>"
for this table. Are you sure that editor.GetData() returns table without <tbody> and <thead> sections?
You're right, the editor actually returns the <tbody> and <thead>, but since my purifier stripped those out, the issue occured.
Thanks for your quick help, after allowing above mentioned elements everything works fine!
Great to hear that - closing :)