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-icons")) { return; } renderElement.insertAdjacentHTML("afterbegin",`