Closed foxhard closed 3 years ago
API design:
export const bold: ICommand = {
name: 'bold',
+ shortcuts: 'cmd+i',
keyCommand: 'bold',
buttonProps: { 'aria-label': 'Add bold text' },
icon: (
<svg role="img" width="12" height="12" viewBox="0 0 384 512">
....
</svg>
),
execute: (state: TextState, api: TextApi) => {},
};
Command
(or Cmd
for short)Control
(or Ctrl
for short)CommandOrControl
(or CmdOrCtrl
for short)Alt
Option
AltGr
Shift
Super
0
to 9
A
to Z
a
to z
Upgrade @uiw/react-md-editor@3.0.0-beta.1
Available modifiers
ctrlcmd
Command or Controlctrl
Controlcmd
Commandalt
shift
Can you provide an example to extend the component to support custom shortcuts?
I'm looking for something like this: