Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/12855

Vanessa1bacf63b0c58
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index df57fa8d71..7b5ce4a4b1 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -1038,9 +1038,9 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
});
textElements[1].value = titleElement.textContent;
textElements[1].addEventListener("input", (event) => {
- const value = (event.target as HTMLInputElement).value.replace(/\n|\r\n|\r|\u2028|\u2029/g, "");
+ const value = (event.target as HTMLInputElement).value;
imgElement.setAttribute("title", value);
- titleElement.textContent = value;
+ titleElement.innerText = value;
mathRender(titleElement);
});
textElements[2].value = imgElement.getAttribute("alt") || "";