Skip to content

Commit 3d29abd

Browse files
committed
fix: make table content support attribution marks
1 parent 89669d2 commit 3d29abd

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

packages/core/src/blocks/Table/block.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ const TiptapTableHeader = Node.create<{
3939
*/
4040
content: "tableContent+",
4141

42+
marks: "y-attributed-delete y-attributed-insert y-attributed-format",
43+
4244
addAttributes() {
4345
return {
4446
colspan: {
@@ -99,6 +101,8 @@ const TiptapTableCell = Node.create<{
99101

100102
content: "tableContent+",
101103

104+
marks: "y-attributed-delete y-attributed-insert y-attributed-format",
105+
102106
addAttributes() {
103107
return {
104108
colspan: {
@@ -256,9 +260,9 @@ const TiptapTableNode = Node.create({
256260

257261
// `TableView` implements its own `update` method, as the view needs to
258262
// be persisted across updates for column resizing to work properly.
259-
// However, it doesn't do anything else, so we have to re-apply the
260-
// HTML attributes from props manually. This isn't an issue for node
261-
// views created e.g. by custom blocks, as those aren't persisted
263+
// However, it doesn't do anything else, so we have to re-apply the
264+
// HTML attributes from props manually. This isn't an issue for node
265+
// views created e.g. by custom blocks, as those aren't persisted
262266
// across updates (they are reinstantiated each time), and so
263267
// `HTMLAttributes` is always up-to-date for those.
264268
update(updatedNode: PMNode): boolean {

0 commit comments

Comments
 (0)