diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 9b413e19f..e5743b9e5 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -1835,7 +1835,7 @@ const genImageHeightMenu = (label: string, imgElement: HTMLElement, protyle: IPr click() { nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss")); imgElement.style.height = label === window.siyuan.languages.default ? "" : parseInt(label) + "vh"; - imgElement.style.width = ""; + imgElement.parentElement.style.width = ""; updateTransaction(protyle, id, nodeElement.outerHTML, html); focusBlock(nodeElement); } diff --git a/app/src/protyle/header/Background.ts b/app/src/protyle/header/Background.ts index 74ebc7c9a..acb68d51f 100644 --- a/app/src/protyle/header/Background.ts +++ b/app/src/protyle/header/Background.ts @@ -444,6 +444,9 @@ export class Background { let html = ""; const colors = ["secondary", "primary", "info", "success", "warning", "error", "pink"]; tags.split(",").forEach((item, index) => { + if (!item) { + return; + } html += `
${escapeHtml(item)}
`; }); this.tagsElement.innerHTML = `${html}