This commit is contained in:
Vanessa 2024-09-10 10:10:01 +08:00
parent ab7187cbbc
commit 06ce692180
2 changed files with 3 additions and 3 deletions

View file

@ -289,8 +289,8 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone", "block"]
} else {
const textPlain = event.clipboardData.getData("text/plain");
const target = event.target as HTMLElement;
const blockElement = hasClosestBlock(target)
const cellsElement = hasClosestByAttribute(target, "data-type", "mAsset")
const blockElement = hasClosestBlock(target);
const cellsElement = hasClosestByAttribute(target, "data-type", "mAsset");
if (blockElement && cellsElement && textPlain) {
updateCellsValue(protyle, blockElement as HTMLElement, textPlain, [cellsElement], undefined, protyle.lute.Md2BlockDOM(textPlain));
document.querySelector(".av__panel")?.remove();

View file

@ -5,7 +5,7 @@ import {Constants} from "../../constants";
import {blockRender} from "../render/blockRender";
import {processRender} from "../util/processCode";
import {highlightRender} from "../render/highlightRender";
import {hasClosestBlock, hasClosestByAttribute, isInEmbedBlock} from "../util/hasClosest";
import {hasClosestByAttribute, isInEmbedBlock} from "../util/hasClosest";
import {setFold, zoomOut} from "../../menus/protyle";
import {disabledProtyle, enableProtyle, onGet} from "../util/onGet";
/// #if !MOBILE