mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-12 18:24:21 +01:00
This commit is contained in:
parent
0e8432fd16
commit
ec34ecac52
2 changed files with 31 additions and 36 deletions
|
|
@ -188,7 +188,7 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement:
|
|||
break;
|
||||
}
|
||||
const cellValue = textJSON[i][j];
|
||||
const operations = await updateCellsValue(protyle, blockElement as HTMLElement, cellValue, [cellElement], columns, html, true);
|
||||
const operations = await updateCellsValue(protyle, blockElement as HTMLElement, cellValue, [cellElement], columns, tempElement.content.children[i].outerHTML, true);
|
||||
if (operations.doOperations.length > 0) {
|
||||
doOperations.push(...operations.doOperations);
|
||||
undoOperations.push(...operations.undoOperations);
|
||||
|
|
@ -292,10 +292,13 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false,
|
|||
return;
|
||||
}
|
||||
|
||||
if (blockElement.classList.contains("av") && !isBlock) {
|
||||
range.deleteContents();
|
||||
processAV(range, html, protyle, blockElement as HTMLElement);
|
||||
return;
|
||||
if (blockElement.classList.contains("av")) {
|
||||
const avTitleElement = hasClosestByClassName(range.startContainer, "av__title");
|
||||
if (!avTitleElement || (avTitleElement && !isBlock)) {
|
||||
range.deleteContents();
|
||||
processAV(range, html, protyle, blockElement as HTMLElement);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (blockElement.classList.contains("table") && blockElement.querySelector(".table__select").clientWidth > 0 &&
|
||||
processTable(range, html, protyle, blockElement)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue