-
I want to override the shortcut keys of the extension. Based on some guidelines in the documentation, I tried the following code, but it did not take effect. I still executed the keymap binding function of the plugin, so I would like to ask how to do it? const hooks = [
() => {
useKeymaps(
{
'Mod-Shift-s': () => {
console.log('Mod-Shift-s')
return false
},
},
ExtensionPriority.Critical,
)
},
];
const Editor = () => {
const { manager } = useRemirror({ extensions: () => [new BoldExtension()] });
return <Remirror manager={manager} hooks={hooks} />;
}; |
Beta Was this translation helpful? Give feedback.
Answered by
ocavue
Aug 4, 2023
Replies: 1 comment 2 replies
-
You can return |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
drl990114
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can return
true
in your code snippet to stop other key bindings from handling it.