mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
This commit is contained in:
parent
be0b52a916
commit
a6da096f66
3 changed files with 11 additions and 0 deletions
|
|
@ -250,6 +250,7 @@ export abstract class Constants {
|
||||||
copyPlainText: {default: "", custom: ""},
|
copyPlainText: {default: "", custom: ""},
|
||||||
copyID: {default: "", custom: ""},
|
copyID: {default: "", custom: ""},
|
||||||
netImg2LocalAsset: {default: "", custom: ""},
|
netImg2LocalAsset: {default: "", custom: ""},
|
||||||
|
optimizeTypography: {default: "", custom: ""},
|
||||||
hLayout: {default: "", custom: ""},
|
hLayout: {default: "", custom: ""},
|
||||||
vLayout: {default: "", custom: ""},
|
vLayout: {default: "", custom: ""},
|
||||||
refPopover: {default: "", custom: ""},
|
refPopover: {default: "", custom: ""},
|
||||||
|
|
|
||||||
|
|
@ -325,6 +325,7 @@ export class Breadcrumb {
|
||||||
if (!protyle.disabled) {
|
if (!protyle.disabled) {
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
label: window.siyuan.languages.optimizeTypography,
|
label: window.siyuan.languages.optimizeTypography,
|
||||||
|
accelerator: window.siyuan.config.keymap.editor.general.optimizeTypography.custom,
|
||||||
icon: "iconFormat",
|
icon: "iconFormat",
|
||||||
click: () => {
|
click: () => {
|
||||||
hideElements(["toolbar"], protyle);
|
hideElements(["toolbar"], protyle);
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,15 @@ export const commonHotkey = (protyle: IProtyle, event: KeyboardEvent) => {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (matchHotKey(window.siyuan.config.keymap.editor.general.optimizeTypography.custom, event)) {
|
||||||
|
fetchPost("/api/format/autoSpace", {
|
||||||
|
id: protyle.block.rootID
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.spaceRepetition.custom, event) ||
|
if (matchHotKey(window.siyuan.config.keymap.editor.general.spaceRepetition.custom, event) ||
|
||||||
matchHotKey(window.siyuan.config.keymap.general.dailyNote.custom, event)) {
|
matchHotKey(window.siyuan.config.keymap.general.dailyNote.custom, event)) {
|
||||||
// 阻止输入 https://ld246.com/article/1679618995926
|
// 阻止输入 https://ld246.com/article/1679618995926
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue