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/7232
Vanessac4c3d880a115
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.tsindex ae9fc7617c..a25461d17d 100644--- a/app/src/menus/protyle.ts+++ b/app/src/menus/protyle.ts@@ -967,10 +967,10 @@ export const iframeMenu = (protyle: IProtyle, nodeElement: Element) => {const iframeElement = nodeElement.querySelector("iframe");let html = nodeElement.outerHTML;const subMenus: IMenu[] = [{- label: `<div class="fn__hr--small"></div><input style="margin: 4px 0" class="b3-text-field fn__size200" value="${iframeElement.getAttribute("src") || ""}" placeholder="${window.siyuan.languages.link}"><div class="fn__hr--small"></div>`,+ label: `<div class="fn__hr--small"></div><textarea rows="1" class="b3-text-field fn__size200" placeholder="${window.siyuan.languages.link}">${iframeElement.getAttribute("src") || ""}</textarea><div class="fn__hr--small"></div>`,bind(element) {- element.querySelector("input").addEventListener("change", (event) => {- const value = (event.target as HTMLInputElement).value;+ element.querySelector("textarea").addEventListener("change", (event) => {+ const value = (event.target as HTMLTextAreaElement).value.replace(/\n|\r\n|\r|\u2028|\u2029/g, "");const biliMatch = value.match(/(?:www\.|\/\/)bilibili\.com\/video\/(\w+)/);if (value.indexOf("bilibili.com") > -1 && (value.indexOf("bvid=") > -1 || (biliMatch && biliMatch[1]))) {const params: IObject = {@@ -1031,11 +1031,10 @@ export const videoMenu = (protyle: IProtyle, nodeElement: Element, type: string)const videoElement = nodeElement.querySelector(type === "NodeVideo" ? "video" : "audio");let html = nodeElement.outerHTML;const subMenus: IMenu[] = [{- label: `<input style="margin: 4px 0" class="b3-text-field" value="${videoElement.getAttribute("src")}" placeholder="${window.siyuan.languages.link}">`,+ label: `<div class="fn__hr--small"></div><textarea rows="1" class="b3-text-field" placeholder="${window.siyuan.languages.link}">${videoElement.getAttribute("src")}</textarea><div class="fn__hr--small"></div>`,bind(element) {- element.querySelector("input").addEventListener("change", (event) => {- const value = (event.target as HTMLInputElement).value;- videoElement.setAttribute("src", value);+ element.querySelector("textarea").addEventListener("change", (event) => {+ videoElement.setAttribute("src", (event.target as HTMLTextAreaElement).value.replace(/\n|\r\n|\r|\u2028|\u2029/g, ""));updateTransaction(protyle, id, nodeElement.outerHTML, html);html = nodeElement.outerHTML;event.stopPropagation();