An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: fix https://github.com/siyuan-note/siyuan/issues/9596
Vanessa087aef84c43f
diff --git a/app/src/assets/scss/component/_typography.scss b/app/src/assets/scss/component/_typography.scssindex 4dbff4e119..77cb1d6388 100644--- a/app/src/assets/scss/component/_typography.scss+++ b/app/src/assets/scss/component/_typography.scss@@ -404,6 +404,7 @@vertical-align: top; // https://ld246.com/article/1647522074722margin: 0 auto;max-width: 100%;+ user-select: none;&:not([style]) {display: initial;diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scssindex 14339beac9..e9b64fe638 100644--- a/app/src/assets/scss/protyle/_wysiwyg.scss+++ b/app/src/assets/scss/protyle/_wysiwyg.scss@@ -320,8 +320,8 @@cursor: col-resize;transition: var(--b3-transition);position: absolute;- top: 45%;- right: 4px;+ top: 35%;+ margin-left: -8px;box-shadow: 0 0 1px 1px var(--b3-theme-on-surface);box-sizing: border-box;z-index: 1;diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.tsindex 02659f1678..0973b0dc42 100644--- a/app/src/menus/protyle.ts+++ b/app/src/menus/protyle.ts@@ -889,7 +889,6 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLElemeimgElement.setAttribute("title", value);titleElement.textContent = value;mathRender(titleElement);- assetElement.style.maxWidth = (imgElement.clientWidth + 10) + "px";});textElements[2].value = imgElement.getAttribute("alt") || "";}@@ -992,7 +991,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLElemealignImgLeft(protyle, nodeElement, [assetElement], id, html);}}).element);- const width = parseInt(assetElement.style.width || "0");+ const width = assetElement.style.width.endsWith("%") ? parseInt(assetElement.style.width) : 0;window.siyuan.menus.menu.append(new MenuItem({label: window.siyuan.languages.width,submenu: [genImageWidthMenu("25%", assetElement, imgElement, protyle, id, nodeElement, html),@@ -1013,7 +1012,6 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLElemerangeElement.addEventListener("input", () => {assetElement.style.width = rangeElement.value + "%";imgElement.style.width = "10000px";- assetElement.style.maxWidth = "";rangeElement.parentElement.setAttribute("aria-label", `${rangeElement.value}%`);});rangeElement.addEventListener("change", () => {@@ -1384,14 +1382,12 @@ const genImageWidthMenu = (label: string, assetElement: HTMLElement, imgElement:if (label === window.siyuan.languages.default) {if (assetElement.style.display === "block") {assetElement.style.width = "";- assetElement.style.maxWidth = "";} else {assetElement.removeAttribute("style");}imgElement.removeAttribute("style");} else {assetElement.style.width = label;- assetElement.style.maxWidth = "";imgElement.style.width = "10000px";}updateTransaction(protyle, id, nodeElement.outerHTML, html);diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.tsindex 9c2f4905a6..41bf99e874 100644--- a/app/src/protyle/wysiwyg/index.ts+++ b/app/src/protyle/wysiwyg/index.ts@@ -453,8 +453,6 @@ export class WYSIWYG {}} else {dragElement.parentElement.parentElement.style.width = (parseInt(dragElement.style.width) + 10) + "px";- // 历史兼容- dragElement.parentElement.parentElement.style.maxWidth = "";}};