Markdown editor -- HTML table colspan renders wrong and corrupts data
📝 Provide detailed reproduction steps (if any)
Reproducible on latest demo version (42.0.1) of Markdown + Source Editor: https://ckeditor.com/ckeditor-5/demo/markdown/
- Paste this HTML in Source mode:
<table>
<thead>
<tr>
<th colspan="2">Wide Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>r1c1</td>
<td>r1c2</td>
</tr>
<tr>
<td>r2c1</td>
<td>r2c2</td>
</tr>
</tbody>
</table>
- Exit Source mode and see the table renders properly:
- Return to Source mode and see the HTML was converted to this markdown:
| Wide Header |
| --- |
| r1c1 | r1c2 |
| r2c1 | r2c2 |
- If you exit Source mode immediately the table still renders properly, however if you modify the source at all or paste the above markdown snippet directly you will see the table get corrupted after exiting Source mode:
- If you go back to Source mode now the markdown has been changed to this:
| Wide Header |
| --- |
| r1c1 |
| r2c1 |
✔️ Expected result
If there is a block that can't be represented properly in markdown it should remain as HTML.
❌ Actual result
Data gets converted into markdown that doesn't match the original HTML.
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
Most likely the issue is related to the plugin for turndown we use. I am not sure if there's a workaround on our side to be applied, replacement of this parser is on our watchlist.
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.
We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).