Last active
May 9, 2020 01:54
-
-
Save ShanonJackson/75ef059c030cf2edca9da1fe692c3c2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const onPaste = (e) => { | |
e.preventDefault(); /* Prevent the DOM Paste */ | |
/* Split on line break regex */ | |
insertString(e.clipboardData.getData("text/plain").replace(/\r?\n|\r/g, "")); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment