Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Singleton Paragraphs in Tables Removed #58

Open
mmichaelis opened this issue Mar 21, 2022 · 0 comments
Open

Singleton Paragraphs in Tables Removed #58

mmichaelis opened this issue Mar 21, 2022 · 0 comments
Labels
feature:richtext Features around CoreMedia RichText 1.0 Data support type:bug Something isn't working

Comments

@mmichaelis
Copy link
Member

Describe the bug

If there is just one paragraph within a table data cell <td>, it is removed within CKEditor processing, which reflects this architectural decision:

The table feature allows for creating block content (like paragraphs, lists, headings, etc.) inside table cells. However, if a table cell contains just one paragraph and this paragraph has no special attributes (like text alignment), the cell content is considered “inline” and the paragraph is not rendered.

(See Tables - CKEditor 5 Documentation).

While this may be desirable, all CoreMedia RichText created with CKEditor 4 comes with paragraphs (always). Thus: While CoreMedia RichText DTD considers singleton paragraphs as valid just as just plain characters within <td>, processing in CKEditor may remove this <p>. This may cause subtle different results in rendering CoreMedia RichText later on, thus, it is considered a bug.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Example App.

  2. Set the following data in source editing:

    <?xml version="1.0" encoding="utf-8"?>
    <div xmlns="http://www.coremedia.com/2003/richtext-1.0"><table><tbody><tr><td><p>Lorem</p></td></tr></tbody></table></div>
  3. Store Data

  4. Reopen source editing.

Expected Behavior

Paragraph should be kept as is (the same: if there is none, no paragraph should be added).

Actual Behavior

Singleton paragraph is always removed according to the requirement stated above.

Possible Workaround

On data-processing add some attribute to the paragraph, so that it isn't removed as being obsolete.

Environment (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Browser Version: 99.0
  • CKEditor Version: 32.0.0
  • CoreMedia's CKEditor Plugins Version: 4.0.1
@mmichaelis mmichaelis added the type:bug Something isn't working label Mar 21, 2022
@mmichaelis mmichaelis added the feature:richtext Features around CoreMedia RichText 1.0 Data support label Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:richtext Features around CoreMedia RichText 1.0 Data support type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant