Ckeditor5: "splitResult is null" on paste HTML code including a nested table

Created on 28 Sep 2018  路  4Comments  路  Source: ckeditor/ckeditor5

Sometimes, when I paste some text copied from a Web page including a table, the editor seems to freeze, and the following error raises in the browser console :

splitResult is null

This error comes from the following line :
https://github.com/ckeditor/ckeditor5-table/blob/master/src/converters/upcasttable.js#L54

table feedback duplicate bug

All 4 comments

@cedx could you provide some example content that causes this bug?

OK, finally found the root cause : nested tables.

Open this HTML file, select all its content (Ctrl + A) and copy/paste it to an instance of the editor :

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
  </head>

  <body>
    <table>
      <tbody>
        <tr>
          <td>Foo</td>
          <td>
            <table>
              <tr>
                <td>Bar</td>
              </tr>
            </table>
          </td>
        </tr>
      </tbody>
    </table>
  </body>
</html>

EDIT : using version 10.1.0 of the @ckeditor/ckeditor5-table package.

This is a dup of https://github.com/ckeditor/ckeditor5/issues/1260. It's fixed on master already and I checked that it's not possible to reproduce the bug in the nightly docs (https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/features/table.html).

There's no error and the editor works fine but the nested table is filtered out. That's because nested tables are not supported yet and this is tracked in https://github.com/ckeditor/ckeditor5-table/issues/121. We'd like to gather feedback when they are needed. What are the use cases.

Thanks, I'll wait for the next release 馃槂

What are the use cases? Not a true usage, just bad habits.
In my company, we have a knowledge base that uses the CKEditor for creating content. It is very common for users to copy and paste content from existing web pages, rather than creating text from scratch.

That's why we have nested tables : they don't come from the users, but from external content. On old websites (and unfortunately also on a few recent websites), nested tables are very common.
So my need is not about editing nested tables, but just to be able to display them inside the editor.

Another thanks for the wonderful job done: I'm very impressed by the version 5 of the editor. 馃憦

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hybridpicker picture hybridpicker  路  3Comments

Reinmar picture Reinmar  路  3Comments

benjismith picture benjismith  路  3Comments

oleq picture oleq  路  3Comments

metalelf0 picture metalelf0  路  3Comments