import {isInEmbedBlock} from "../util/hasClosest"; import {Constants} from "../../constants"; export const genIconHTML = (element?: false | HTMLElement) => { let enable = true; if (element) { const readonly = element.getAttribute("data-readonly"); if (typeof readonly === "string") { enable = readonly === "false"; } else { return '
'; } } return ``; }; export const genRenderFrame = (renderElement: Element) => { if (renderElement.querySelector(".protyle-cursor")) { return; } const type = renderElement.getAttribute("data-type"); if (type === "NodeBlockQueryEmbed") { renderElement.insertAdjacentHTML("afterbegin", `