-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Editor crashes with a downcasting error when input contain an empty <tr></tr> #3274
Comments
Hello, can you provide step-by-step instruction on how to reproduce the issue in the editor? |
Hmm this will break the editor, ie in the article manual test: <table><tr></tr><tr></tr></table> Error:
|
The thing is that ideally we should not end up with model that has content like that - this is clearly pointless table markup. We did put extra effort in iteration 30 to make sure no empty rows are created by our core plugins (ckeditor/ckeditor5-table#277, ckeditor/ckeditor5-table#278). But in the end we decided that we need to fix the source of the issue, rather to make all our algorithms work with flawed table structure. I mentioned that there will be issues like this popping out with time, and we can see some examples:
That being said I believe we should change our approach and gracefully handle case with empty row. |
The issues you mentioned comes from, unfortunately, wrong table handling in our commands. The fixes are on the way: #6545 & #6546. However we should make our conversion process resilient and anticipate wrong input data. |
Fix (table): Empty table rows are properly handled during conversion and layout post-fixing. Closes #3274.
This was fixed if i hard replace the source html by
replace(/<tr[^<]*><\/tr>/gm, '<tr><th></th></tr>')
The text was updated successfully, but these errors were encountered: