Skip to content

Support block content inside tables #3199

Closed
ckeditor/ckeditor5-table
#97
@Reinmar

Description

@Reinmar

The MVP of the table feature doesn't contain a support for block content inside table cells. So, the first version will only support inline content (no images, no lists, no hard line breaks etc.)

Support for block content is our next priority after releasing the MVP. The challenge here is the UX. By default, we insert a table with inline content only:

<table>
    <tr> 
       <td>Foo</td>
       <td>Boo</td>
   </tr>
</table>

When the user presses Enter in one of the cells, what should happen? We need to insert paragraphs there:

<table>
    <tr> 
       <td><p>Foo</p><p>Bar</p></td>
       <td>Boo</td>
   </tr>
</table>

Is it ok that only one cell has block content and the other has inline content? This may cause vertical misalignment due to styling (paragraphs have margins) and general mess. So perhaps once you create block content in one of the cells, we should turn the entire table into "block table"?

There are also implementation issues. How to reflect that in the schema? A cell may contain inline content. Or it may contain block content. These are two different types of cells. Two different elements. Also, for features like headings, lists, etc. to be enabled, a block must be allowed in the current selection position. So, without paragraphs in the model all these features will be disabled. So, in fact, we always need paragraphs in the model.

And so on and so on :)

Metadata

Metadata

Assignees

Labels

package:tabletype:featureThis issue reports a feature request (an idea for a new functionality or a missing option).

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions