mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-05 12:20:16 +01:00
This commit is contained in:
parent
92bc52c6ab
commit
421297d338
2 changed files with 21 additions and 6 deletions
|
|
@ -170,12 +170,15 @@ const genUploadedLabel = (responseText: string, protyle: IProtyle) => {
|
|||
}
|
||||
|
||||
if (document.querySelector(".av__panel")) {
|
||||
const cellElements: HTMLElement[] = [];
|
||||
protyle.wysiwyg.element.querySelectorAll(".av__cell--active").forEach((item: HTMLElement) => {
|
||||
if (getTypeByCellElement(item) === "mAsset") {
|
||||
cellElements.push(item);
|
||||
}
|
||||
});
|
||||
const cellElements: HTMLElement[] = [document.querySelector('.custom-attr__avvalue[data-type="mAsset"][data-active="true"]')];
|
||||
if (!cellElements[0]) {
|
||||
cellElements.splice(0, 1);
|
||||
protyle.wysiwyg.element.querySelectorAll(".av__cell--active").forEach((item: HTMLElement) => {
|
||||
if (getTypeByCellElement(item) === "mAsset") {
|
||||
cellElements.push(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (cellElements.length > 0) {
|
||||
const blockElement = hasClosestBlock(cellElements[0]);
|
||||
if (blockElement) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue