soccerloway / quill-better-table

Module for better table in Quill, more useful features are supported.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table can't use ul/ol

webhao opened this issue · comments

download
download-1

// in table.js
const List = Quill.import('formats/list')
const Block = Quill.import('blots/block')
...
TableCell.allowedChildren = [..., List.requiredContainer, Block]

List.requiredContainer can make you add ul, and Block can preserve the TableCell after cancel ul format

@WongYAQi It's not enough for adding ul/ol in table cell.
To achieve it, the listItem blot and listContainer blot need to be modified accordingly (like table cell line). Currently there is no support for ul/ol in table cell.

@WongYAQi It's not enough for adding ul/ol in table cell.
To achieve it, the listItem blot and listContainer blot need to be modified accordingly (like table cell line). Currently there is no support for ul/ol in table cell.

yes, I found that there was problem when merge two list cell, and checkMerge function would throw error.
So I realized that "add ui in table" would be a long-term job.But this may be helpful when just show the ul element with this little change.

commented
// in table.js
const List = Quill.import('formats/list')
const Block = Quill.import('blots/block')
...
TableCell.allowedChildren = [..., List.requiredContainer, Block]

List.requiredContainer can make you add ul, and Block can preserve the TableCell after cancel ul format

I'll do as you say, It's half done, The other half is the problem of setting, Didn't you solve it?

commented

The setContents will go wrong