diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 501997ca5..fc095f596 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -471,6 +471,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => { let submenu: IMenu[] = []; if (element.getAttribute("data-subtype") === "s") { submenu.push({ + iconHTML: "", label: window.siyuan.languages.turnToDynamic, click() { element.setAttribute("data-subtype", "d"); @@ -485,6 +486,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => { }); } else { submenu.push({ + iconHTML: "", label: window.siyuan.languages.turnToStatic, click() { element.setAttribute("data-subtype", "s"); @@ -496,6 +498,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => { }); } submenu = submenu.concat([{ + iconHTML: "", label: window.siyuan.languages.text, click() { nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss")); @@ -504,6 +507,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => { oldHTML = nodeElement.outerHTML; } }, { + iconHTML: "", label: "*", click() { element.setAttribute("data-subtype", "s"); @@ -514,6 +518,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => { oldHTML = nodeElement.outerHTML; } }, { + iconHTML: "", label: window.siyuan.languages.text + " *", click() { element.insertAdjacentHTML("beforebegin", element.innerHTML + " "); @@ -526,7 +531,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => { } }, { label: window.siyuan.languages.link, - icon: "iconLink", + iconHTML: "", click() { element.outerHTML = `${element.innerHTML}`; nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss")); @@ -537,8 +542,8 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => { }]); if (element.parentElement.textContent.trim() === element.textContent.trim() && element.parentElement.tagName === "DIV") { submenu.push({ + iconHTML: "", label: window.siyuan.languages.blockEmbed, - icon: "iconSQL", click() { const html = `
${nodeElement.querySelector(".protyle-attr").outerHTML}
`; nodeElement.outerHTML = html; @@ -549,6 +554,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => { }); } submenu.push({ + iconHTML: "", label: window.siyuan.languages.defBlock, click() { fetchPost("/api/block/swapBlockRef", { @@ -559,6 +565,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => { } }); submenu.push({ + iconHTML: "", label: window.siyuan.languages.defBlockChildren, click() { fetchPost("/api/block/swapBlockRef", {