ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Markdown editor -- HTML table colspan renders wrong and corrupts data

Open adamerose opened this issue 1 year ago • 1 comments

📝 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/

  1. 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>
  1. Exit Source mode and see the table renders properly: image
  2. Return to Source mode and see the HTML was converted to this markdown:
| Wide Header |
| --- |
| r1c1 | r1c2 |
| r2c1 | r2c2 |
  1. 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: image
  2. 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.

adamerose avatar Jul 24 '24 17:07 adamerose

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.

Witoso avatar Jul 26 '24 11:07 Witoso

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.

CKEditorBot avatar Jul 26 '25 23:07 CKEditorBot

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).

CKEditorBot avatar Aug 25 '25 23:08 CKEditorBot