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/7979
Vanessa8680611ed93f
diff --git a/app/src/mobile/menu/search.ts b/app/src/mobile/menu/search.tsindex 447e74b000..6c691c64bb 100644--- a/app/src/mobile/menu/search.ts+++ b/app/src/mobile/menu/search.ts@@ -350,7 +350,7 @@ const initSearchEvent = (element: Element, config: ISearchOption) => {event.stopPropagation();event.preventDefault();break;- } else if (type === "include" && !target.hasAttribute("disabled")){+ } else if (type === "include" && !target.hasAttribute("disabled")) {target.classList.toggle("toolbar__icon--active");if (target.classList.contains("toolbar__icon--active")) {config.idPath.forEach((item, index) => {diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.tsindex f75fdf0b3e..45d84dc155 100644--- a/app/src/protyle/wysiwyg/index.ts+++ b/app/src/protyle/wysiwyg/index.ts@@ -185,6 +185,12 @@ export class WYSIWYG {/// #endif}+ private emojiToMd(element:HTMLElement) {+ element.querySelectorAll(".emoji").forEach((item: HTMLElement) => {+ item.outerHTML = `:${item.getAttribute("alt")}:`+ })+ }+private bindCommonEvent(protyle: IProtyle) {this.element.addEventListener("copy", (event: ClipboardEvent & { target: HTMLElement }) => {window.siyuan.ctrlIsPressed = false; // https://github.com/siyuan-note/siyuan/issues/6373@@ -257,9 +263,11 @@ export class WYSIWYG {} else if (!["DIV", "TD", "TH", "TR"].includes(range.startContainer.parentElement.tagName)) {// 复制行内元素 https://github.com/siyuan-note/insider/issues/191tempElement.append(range.startContainer.parentElement.cloneNode(true));+ this.emojiToMd(tempElement)} else {// 直接复制块 https://github.com/siyuan-note/insider/issues/318tempElement.append(range.cloneContents());+ this.emojiToMd(tempElement)}html = tempElement.innerHTML;} else if (selectImgElement) {@@ -281,6 +289,7 @@ export class WYSIWYG {html = spanElement.outerHTML;} else {tempElement.append(range.cloneContents());+ this.emojiToMd(tempElement)const inlineMathElement = hasClosestByAttribute(range.commonAncestorContainer, "data-type", "inline-math");if (inlineMathElement) {// 表格内复制数学公式 https://ld246.com/article/1631708573504@@ -1140,6 +1149,7 @@ export class WYSIWYG {}}}+ this.emojiToMd(tempElement);html = tempElement.innerHTML;// https://github.com/siyuan-note/siyuan/issues/4321if (!nodeElement.classList.contains("table")) {