mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 08:01:59 +08:00
This commit is contained in:
parent
2ef990b312
commit
482c1a8ba6
@ -746,21 +746,23 @@ export class Toolbar {
|
|||||||
focusByRange(this.range);
|
focusByRange(this.range);
|
||||||
|
|
||||||
const showMenuElement = newNodes[0] as HTMLElement;
|
const showMenuElement = newNodes[0] as HTMLElement;
|
||||||
const showMenuTypes = (showMenuElement.getAttribute("data-type") || "").split(" ");
|
if (showMenuElement.nodeType !== 3) {
|
||||||
if (type === "inline-math") {
|
const showMenuTypes = (showMenuElement.getAttribute("data-type") || "").split(" ");
|
||||||
mathRender(nodeElement);
|
if (type === "inline-math") {
|
||||||
if (selectText === "" && showMenuTypes.includes("inline-math")) {
|
mathRender(nodeElement);
|
||||||
protyle.toolbar.showRender(protyle, showMenuElement, undefined, html);
|
if (selectText === "" && showMenuTypes.includes("inline-math")) {
|
||||||
}
|
protyle.toolbar.showRender(protyle, showMenuElement, undefined, html);
|
||||||
} else if (type === "inline-memo") {
|
}
|
||||||
if (!showMenuElement.getAttribute("data-inline-memo-content") &&
|
} else if (type === "inline-memo") {
|
||||||
showMenuTypes.includes("inline-memo")) {
|
if (!showMenuElement.getAttribute("data-inline-memo-content") &&
|
||||||
protyle.toolbar.showRender(protyle, showMenuElement, newNodes as Element[], html);
|
showMenuTypes.includes("inline-memo")) {
|
||||||
}
|
protyle.toolbar.showRender(protyle, showMenuElement, newNodes as Element[], html);
|
||||||
} else if (type === "a") {
|
}
|
||||||
if (showMenuTypes.includes("a") &&
|
} else if (type === "a") {
|
||||||
(showMenuElement.textContent.replace(Constants.ZWSP, "") === "" || !showMenuElement.getAttribute("data-href"))) {
|
if (showMenuTypes.includes("a") &&
|
||||||
linkMenu(protyle, showMenuElement, showMenuElement.getAttribute("data-href") ? true : false);
|
(showMenuElement.textContent.replace(Constants.ZWSP, "") === "" || !showMenuElement.getAttribute("data-href"))) {
|
||||||
|
linkMenu(protyle, showMenuElement, showMenuElement.getAttribute("data-href") ? true : false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user