Skip to content

Commit

Permalink
fix: Delete/copy table
Browse files Browse the repository at this point in the history
  • Loading branch information
areknawo committed May 9, 2024
1 parent f52a060 commit 50db2e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions apps/web/src/lib/editor/editing.ts
Expand Up @@ -72,6 +72,11 @@ const createClipboardSerializer = (
nodes;
} else if (name === "taskList") {
nodes.taskItem = base.nodes.taskItem;
} else if (name === "table") {
nodes.table = base.nodes.table;
nodes.tableRow = base.nodes.tableRow;
nodes.tableCell = base.nodes.tableCell;
nodes.tableHeader = base.nodes.tableHeader;
}

nodes[name] = node;
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/table.ts
Expand Up @@ -79,7 +79,7 @@ class TableView implements NodeView {
this.cellMinWidth = cellMinWidth;
this.dom = document.createElement("div");
this.dom.className = "relative";
this.dom.style.display = "inline-grid";
this.dom.style.display = "grid";
this.dom.appendChild(wrapper);
this.table = wrapper.appendChild(document.createElement("table"));
this.colgroup = this.table.appendChild(document.createElement("colgroup"));
Expand Down

0 comments on commit 50db2e6

Please sign in to comment.