mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-12 15:52:56 +10:00
Add a keyboard shortcut for adding a hyperlink
Use the conventional Ctrl+K keyboard shortcut for adding a hyperlink
This commit is contained in:
@ -444,7 +444,16 @@ export const RichInput = forwardRef<Editor, RichInputProps>(
|
||||
Image,
|
||||
Underline,
|
||||
Highlight,
|
||||
Link.configure({ openOnClick: false }),
|
||||
Link.extend({
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
"Mod-k": () => {
|
||||
setLinkGlobal(this.editor as Editor);
|
||||
return true;
|
||||
},
|
||||
};
|
||||
},
|
||||
}).configure({ openOnClick: false }),
|
||||
TextAlign.configure({ types: ["heading", "paragraph"] }),
|
||||
],
|
||||
editorProps: {
|
||||
|
||||
Reference in New Issue
Block a user