Vanessa 2024-04-16 00:18:04 +08:00
parent 781183e434
commit ffbb1423b3
3 changed files with 27 additions and 13 deletions

View file

@ -71,7 +71,8 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement:
return true;
}
const type = getTypeByCellElement(cellElement) || cellElement.dataset.type as TAVCol;
if (["created", "updated", "template", "rollup"].includes(type)) {
if (["created", "updated", "template", "rollup"].includes(type) ||
(type === "block" && !cellElement.dataset.detached)) {
return;
}
const rowID = currentRowElement.getAttribute("data-id");
@ -89,7 +90,8 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement:
return;
}
cellValue = genCellValue(type, cellValue[cellValue.type as "text"].content.toString());
} else if (cellValue.type === "block") {
}
if (cellValue.type === "block") {
cellValue.isDetached = true;
delete cellValue.block.id;
}