-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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:
-
Go to Example App.
-
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>
-
Store Data
-
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