mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-19 13:38:06 +01:00
This commit is contained in:
parent
a02c616f22
commit
8520b02df5
3 changed files with 18 additions and 4 deletions
|
|
@ -80,9 +80,12 @@ export class Plugin {
|
|||
});
|
||||
|
||||
this.updateProtyleToolbar([]).forEach(toolbarItem => {
|
||||
if (typeof toolbarItem === "string" || Constants.INLINE_TYPE.concat("|").includes(toolbarItem.name) || !toolbarItem.hotkey) {
|
||||
if (typeof toolbarItem === "string" || Constants.INLINE_TYPE.concat("|").includes(toolbarItem.name)) {
|
||||
return;
|
||||
}
|
||||
if (typeof toolbarItem.hotkey !== "string") {
|
||||
toolbarItem.hotkey = "";
|
||||
}
|
||||
if (!window.siyuan.config.keymap.plugin) {
|
||||
window.siyuan.config.keymap.plugin = {};
|
||||
}
|
||||
|
|
@ -99,6 +102,8 @@ export class Plugin {
|
|||
default: toolbarItem.hotkey,
|
||||
custom: toolbarItem.hotkey,
|
||||
};
|
||||
} else {
|
||||
window.siyuan.config.keymap.plugin[options.name][toolbarItem.name].default = toolbarItem.hotkey;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue