mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-05 12:20:16 +01:00
This commit is contained in:
parent
650493dcdb
commit
15ec12e4db
4 changed files with 67 additions and 34 deletions
|
|
@ -17,15 +17,20 @@ export const genIconHTML = (element?: false | HTMLElement) => {
|
|||
</div>`;
|
||||
};
|
||||
|
||||
export const genRenderFrame = (renderElement:Element) => {
|
||||
if (renderElement.querySelector(".protyle-icons")) {
|
||||
export const genRenderFrame = (renderElement: Element) => {
|
||||
if (renderElement.querySelector(".protyle-cursor")) {
|
||||
return;
|
||||
}
|
||||
renderElement.insertAdjacentHTML("afterbegin",`<div class="protyle-icons${isInEmbedBlock(renderElement) ? " fn__none" : ""}">
|
||||
const type = renderElement.getAttribute("data-type");
|
||||
if (type === "NodeBlockQueryEmbed") {
|
||||
renderElement.insertAdjacentHTML("afterbegin", `<div class="protyle-icons${isInEmbedBlock(renderElement) ? " fn__none" : ""}">
|
||||
<span aria-label="${window.siyuan.languages.refresh}" class="b3-tooltips__nw b3-tooltips protyle-icon protyle-action__reload protyle-icon--first"><svg class="fn__rotate"><use xlink:href="#iconRefresh"></use></svg></span>
|
||||
<span aria-label="${window.siyuan.languages.update} SQL" class="b3-tooltips__nw b3-tooltips protyle-icon protyle-action__edit"><svg><use xlink:href="#iconEdit"></use></svg></span>
|
||||
<span aria-label="${window.siyuan.languages.more}" class="b3-tooltips__nw b3-tooltips protyle-icon protyle-action__menu protyle-icon--last"><svg><use xlink:href="#iconMore"></use></svg></span>
|
||||
</div><div style="position: absolute;">${Constants.ZWSP}</div>`)
|
||||
</div><div class="protyle-cursor">${Constants.ZWSP}</div>`);
|
||||
} else if (type==="NodeMathBlock") {
|
||||
renderElement.firstElementChild.innerHTML = `<span></span><span class="protyle-cursor">${Constants.ZWSP}</span>`;
|
||||
}
|
||||
}
|
||||
|
||||
export const processClonePHElement = (item: Element) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue