ckeditor / github-writer

GitHub Writer - WYSIWYG Rich-Text Editor for GitHub, powered by CKEditor.
https://ckeditor.com/
Other
376 stars 61 forks source link

Buggy conversion for complex table #391

Open mlewand opened 1 year ago

mlewand commented 1 year ago

📝 Provide detailed reproduction steps (if any)

I was just writing up ckeditor/ckeditor5#12628 issue and the table got broken upon save.

  1. Open any existing issue page.
  2. Set data to the following payload:

    ## 📝 Provide a description of the improvement
    
    Based on comparison with other Word processors there are some differences in CKE5 when it comes down to remove format:
    
    *   List custom style is not removed.
        *   CKE5 and GDocs are the only editors that are not removing upper roman style from contained list.
    *   Image alignment is not removed.
        *   CKE5 is the only one that doesn't remove image alignment.
    *   Table alignment is not removed
        *   CKE5, MSWord and GDocs are not removing table alignment.
        *   I find it to be inconsistent, since alignment attribute is removed from the image.
    
    ### Comparison across products
    
    | Product | Before | After remove format |
    | --- | --- | --- |
    | [CKEditor 5](https://ckeditor.com/docs/ckeditor5/35.2.0/examples/builds-custom/full-featured-editor.html) | ![](https://user-images.githubusercontent.com/5353898/194950026-b1831c19-12bc-45a3-a25b-0e92179f8bca.png) | ![](https://user-images.githubusercontent.com/5353898/194950099-cd353a0f-a9e7-4543-9d2b-83df4061d945.png) |
    | MS Word | ![](https://user-images.githubusercontent.com/5353898/194942797-704c40a6-4240-440b-89e3-fae2cd6426be.png) | ![](https://user-images.githubusercontent.com/5353898/194942949-e79313f0-9e5d-448b-8876-9227ecf06ea3.png) |
    | GDocs | ![](https://user-images.githubusercontent.com/5353898/194943526-089b3677-7f77-45bb-a601-9a90915420d6.png) | ![](https://user-images.githubusercontent.com/5353898/194943659-20db3f31-6cf3-45d7-b120-de796e859f25.png) |
    | [CKE4](https://ckeditor.com/docs/ckeditor4/latest/examples/pastefromword.html) | ![](https://user-images.githubusercontent.com/5353898/194944769-82b727c4-a8e3-4686-9fea-316a0a39e0e9.png) | ![](https://user-images.githubusercontent.com/5353898/194944877-f8de897f-560b-449c-8559-7287d3edf8ff.png) |
    | [TinyMCE](https://www.tiny.cloud/docs/demo/full-featured/#fullfeaturedincludingpremiumplugins) | ![](https://user-images.githubusercontent.com/5353898/194951486-724f5e08-078c-4bec-afb7-918784dc2169.png) | ![](https://user-images.githubusercontent.com/5353898/194951540-f4836ca3-1530-4354-acb7-d29fd0b0c403.png) |
  3. Save the comment (alternatively you can turn to nostalgia mode and back to wysiwyg).

✔️ Expected result

The comment should be rendered nicely and tight:

❌ Actual result

Conversion failed:

❓ Possible solution

It's likely to be an upstream md conversion bug.

📃 Other details


If you'd like to see this fixed sooner, add a 👍 reaction to this post.