This commit is contained in:
Vanessa 2022-10-23 00:09:27 +08:00
parent 407c859a1e
commit 1134854c40
2 changed files with 5 additions and 1 deletions

View file

@ -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: {

View file

@ -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";