There was an error while loading. Please reload this page.
1 parent acf46df commit 03c9c7bCopy full SHA for 03c9c7b
1 file changed
packages/table/src/lib/withNormalizeTable.ts
@@ -94,6 +94,26 @@ export const withNormalizeTable: OverrideEditor<TableConfig> = ({
94
return;
95
}
96
97
+ if (path.length === 1) {
98
+ const isLastBlock = path[0] === editor.children.length - 1;
99
+
100
+ if (isLastBlock) {
101
+ editor.tf.insertNodes(editor.api.create.block(), {
102
+ at: [path[0] + 1],
103
+ });
104
105
+ return;
106
+ }
107
108
+ const nextNode = editor.children[path[0] + 1];
109
110
+ if (ElementApi.isElement(nextNode) && nextNode.type === type) {
111
112
113
114
115
116
117
118
119
if (n.type === editor.getType(KEYS.tr)) {
0 commit comments