Vanessa 2025-05-22 19:32:52 +08:00
parent bd0bb5241a
commit ae4adfeba4

View file

@ -1,4 +1,4 @@
import {hasClosestBlock, hasClosestByAttribute} from "../protyle/util/hasClosest"; import {hasClosestBlock, isInEmbedBlock} from "../protyle/util/hasClosest";
import {focusByRange, getEditorRange} from "../protyle/util/selection"; import {focusByRange, getEditorRange} from "../protyle/util/selection";
export const bgFade = (element: Element) => { export const bgFade = (element: Element) => {
@ -22,7 +22,7 @@ export const highlightById = (protyle: IProtyle, id: string, top = false) => {
} }
Array.from(protyleElement.querySelectorAll(`[data-node-id="${id}"]`)).find((item: HTMLElement) => { Array.from(protyleElement.querySelectorAll(`[data-node-id="${id}"]`)).find((item: HTMLElement) => {
if (!hasClosestByAttribute(item, "data-type", "block-render", true)) { if (!isInEmbedBlock(item)) {
nodeElement = item; nodeElement = item;
return true; return true;
} }