Ckeditor5: Plugin crashes with spaces in HTML-Code with tables

Created on 8 Nov 2018  路  6Comments  路  Source: ckeditor/ckeditor5

Hi,

we figured out the following issue with the table plugin:

editor.setData('<table><tbody><tr><td>First row</td></tr><tr><td>Second row</td></tr><tr><td>Third row</td></tr> <tr><td>Fourth row</td></tr></tbody></table>')

This causes the following error (reproducable with current master build on ckeditor.com):

Uncaught TypeError: t.getChildren is not a function
    at Cg (upcasttable.js:223)
    at upcasttable.js:194
    at Ia.t.on (upcasttable.js:31)
    at Ia.fire (emittermixin.js:196)
    at Ia._convertItem (upcastdispatcher.js:212)
    at Ia._convertChildren (upcastdispatcher.js:243)
    at Ia.La.upcastDispatcher.on (upcast-converters.js:584)
    at Ia.fire (emittermixin.js:196)
    at Ia._convertItem (upcastdispatcher.js:216)
    at Ia.convert (upcastdispatcher.js:171)

If we remove the space between the third and fourth-row tr-tag, all works fine.

Can someone of you investigate here?

Thanks!

table bug

Most helpful comment

Works like charm, thanks for that quick bugfix!

All 6 comments

Confirmed, thanks.

Turnes out we stumbled upon this in https://github.com/ckeditor/ckeditor5-paste-from-office/issues/23#issuecomment-436678497 too.

@Reinmar
Is there a estimation date-range when this can be fixed? Our customers found this bug in production, so maybe we have to create a workaround until this is fixed in CK.

We plan a code freeze in 1-2 weeks and then 1-2 weeks for a testing phase and preparing the release, so 3-4 weeks. You shouldn't have a problem to backport the patch from the PR to the last release, though.

Works like charm, thanks for that quick bugfix!

Was this page helpful?
0 / 5 - 0 ratings