An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:rotating_light:
Vanessa17f6ab335b4b
diff --git a/app/src/menus/Menu.ts b/app/src/menus/Menu.tsindex 7400afe9d3..7ba6db9a02 100644--- a/app/src/menus/Menu.ts+++ b/app/src/menus/Menu.ts@@ -116,7 +116,7 @@ export class Menu {return;}if (typeof index === "number") {- const insertElement = this.element.querySelectorAll(".b3-menu__items > .b3-menu__separator")[index]+ const insertElement = this.element.querySelectorAll(".b3-menu__items > .b3-menu__separator")[index];if (insertElement) {insertElement.before(element);return;diff --git a/app/src/plugin/index.ts b/app/src/plugin/index.tsindex 9c319830d0..c3b0d7fb8c 100644--- a/app/src/plugin/index.ts+++ b/app/src/plugin/index.ts@@ -217,5 +217,5 @@ export class Plugin {nodeIds: options.ids,defIds: options.defIds,}));- }+ };}diff --git a/app/src/protyle/toolbar/Font.ts b/app/src/protyle/toolbar/Font.tsindex 3fc5c5a8cd..e7847ef16e 100644--- a/app/src/protyle/toolbar/Font.ts+++ b/app/src/protyle/toolbar/Font.ts@@ -14,11 +14,11 @@ export class Font extends ToolbarItem {this.element.addEventListener("click", () => {let nodeElements: Element[];if (protyle.toolbar.range.toString() === "") {- nodeElements = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"))+ nodeElements = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));if (nodeElements.length === 0) {const nodeElement = hasClosestBlock(protyle.toolbar.range.startContainer);if (nodeElement) {- nodeElements = [nodeElement]+ nodeElements = [nodeElement];}}}@@ -94,7 +94,7 @@ export const appearanceMenu = (protyle: IProtyle, nodeElements?: Element[]) => {});lastColorHTML += "</div>";}- let textElement: HTMLElement+ let textElement: HTMLElement;let fontSize = "16px";if (nodeElements && nodeElements.length > 0) {textElement = nodeElements[0] as HTMLElement;@@ -216,7 +216,7 @@ export const fontEvent = (protyle: IProtyle, nodeElements: Element[], type?: stre.style.backgroundColor = "";e.style.fontSize = "";} else if (type === "style1") {- const colorList = color.split(Constants.ZWSP)+ const colorList = color.split(Constants.ZWSP);e.style.backgroundColor = colorList[0];e.style.color = colorList[1];} else if (type === "style2") {diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.tsindex 5a70cab786..4448d99913 100644--- a/app/src/protyle/wysiwyg/keydown.ts+++ b/app/src/protyle/wysiwyg/keydown.ts@@ -1290,11 +1290,11 @@ export const keydown = (app: App, protyle: IProtyle, editorElement: HTMLElement)// toolbar actionif (matchHotKey(window.siyuan.config.keymap.editor.insert.lastUsed.custom, event)) {protyle.toolbar.range = range;- let selectElements: Element[] = []+ let selectElements: Element[] = [];if (selectText === "") {selectElements = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));if (selectElements.length === 0) {- selectElements = [nodeElement]+ selectElements = [nodeElement];}}fontEvent(protyle, selectElements);