Binding Command+k to open Insert Link prompt


#1

Command+k is a popular keybinding to insert a link, so I made a basic implementation of this with ProseMirror.

Here’s the code and a demo.


#2

You should return true from the function bound to the key—on many browsers, ctrl-k focuses the URL bar, and if the command doesn’t indicate that it handled the key, the default behavior will go through.


#3

Thanks for reviewing! I updated the code to fix that bug.