Skip to content

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

:recycle:

Vanessa1134854c4074
diff --git a/app/src/protyle/wysiwyg/commonHotkey.ts b/app/src/protyle/wysiwyg/commonHotkey.ts
index e553c01146..055e0b2b9b 100644
--- a/app/src/protyle/wysiwyg/commonHotkey.ts
+++ b/app/src/protyle/wysiwyg/commonHotkey.ts
@@ -4,7 +4,9 @@ import {writeText} from "../util/compatibility";
import {focusByOffset, getSelectionOffset, setFirstNodeRange, setLastNodeRange} from "../util/selection";
import {fullscreen, netImg2LocalAssets} from "../breadcrumb/action";
import {setPadding} from "../ui/initUI";
+/// #if !MOBILE
import {openBacklink, openGraph, openOutline} from "../../layout/dock/util";
+/// #endif
import {reloadProtyle} from "../util/reload";
import {getContenteditableElement} from "./getBlock";
import {hasClosestByMatchTag} from "../util/hasClosest";
@@ -44,6 +46,7 @@ export const commonHotkey = (protyle: IProtyle, event: KeyboardEvent) => {
event.stopPropagation();
return;
}
+ /// #if !MOBILE
if (protyle.model) {
if (matchHotKey(window.siyuan.config.keymap.editor.general.backlinks.custom, event)) {
event.preventDefault();
@@ -67,6 +70,7 @@ export const commonHotkey = (protyle: IProtyle, event: KeyboardEvent) => {
return true;
}
}
+ /// #endif
};
export const upSelect = (options: {
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 4b3729d627..9d24426869 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -41,8 +41,8 @@ import {insertEmptyBlock, jumpToParentNext} from "../../block/util";
import {isLocalPath} from "../../util/pathName";
/// #if !MOBILE
import {openBy, openFileById} from "../../editor/util";
-import {commonHotkey, downSelect, getStartEndElement, upSelect} from "./commonHotkey";
/// #endif
+import {commonHotkey, downSelect, getStartEndElement, upSelect} from "./commonHotkey";
import {linkMenu, refMenu, setFold, zoomOut} from "../../menus/protyle";
import {removeEmbed} from "./removeEmbed";
import {openAttr} from "../../menus/commonMenuItem";