Skip to content

Commit

Permalink
fix: remove paragraph tag's hardcoded values
Browse files Browse the repository at this point in the history
  • Loading branch information
Palanikannan1437 committed Jan 6, 2025
1 parent 61ded96 commit 96e9f15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/editor/src/core/extensions/table/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const Table = Node.create({
// Delete any existing content at the current position if it's an empty paragraph
const nodeAfter = tr.doc.nodeAt(position);
if (nodeAfter && nodeAfter.type.name === "paragraph" && nodeAfter.content.size === 0) {
tr.delete(position, position + 2);
tr.delete(position, position + nodeAfter.nodeSize);
}

// Insert the table
Expand Down

0 comments on commit 96e9f15

Please sign in to comment.