mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-07 09:18:49 +01:00
This commit is contained in:
parent
f1b9417691
commit
ba768225a0
2 changed files with 14 additions and 14 deletions
|
|
@ -36,20 +36,6 @@ export const commonHotkey = (protyle: IProtyle, event: KeyboardEvent) => {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.refresh.custom, event)) {
|
||||
reloadProtyle(protyle);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.fullscreen.custom, event)) {
|
||||
fullscreen(protyle.element);
|
||||
setPadding(protyle);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return true;
|
||||
}
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.netImg2LocalAsset.custom, event)) {
|
||||
netImg2LocalAssets(protyle);
|
||||
event.preventDefault();
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@ import {openHistory} from "../history/history";
|
|||
import {openCard} from "../card/openCard";
|
||||
import {lockScreen} from "../dialog/processSystem";
|
||||
import {isWindow} from "./functions";
|
||||
import {reloadProtyle} from "../protyle/util/reload";
|
||||
import {fullscreen} from "../protyle/breadcrumb/action";
|
||||
import {setPadding} from "../protyle/ui/initUI";
|
||||
|
||||
const getRightBlock = (element: HTMLElement, x: number, y: number) => {
|
||||
let index = 1;
|
||||
|
|
@ -1083,6 +1086,17 @@ const editKeydown = (event: KeyboardEvent) => {
|
|||
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || hasClosestByAttribute(target, "contenteditable", null)) {
|
||||
return false;
|
||||
}
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.refresh.custom, event)) {
|
||||
reloadProtyle(protyle);
|
||||
event.preventDefault();
|
||||
return true;
|
||||
}
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.fullscreen.custom, event)) {
|
||||
fullscreen(protyle.element);
|
||||
setPadding(protyle);
|
||||
event.preventDefault();
|
||||
return true;
|
||||
}
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.preview.custom, event)) {
|
||||
setEditMode(protyle, "preview");
|
||||
event.preventDefault();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue