feat: revamped keybinding implementation

This commit is contained in:
Andrew Bastin
2021-07-29 22:13:06 -04:00
parent e138a5f846
commit b524fa7248
8 changed files with 341 additions and 124 deletions

View File

@@ -0,0 +1,14 @@
/**
* Copies a given string to the clipboard using
* the legacy exec method
*
* @param content The content to be copied
*/
export function copyToClipboard(content: string) {
const dummy = document.createElement("input")
document.body.appendChild(dummy)
dummy.value = content
dummy.select()
document.execCommand("copy")
document.body.removeChild(dummy)
}