Created
May 5, 2021 12:09
-
-
Save dan-laskowski/e3c7df400221c2c702eb6f620fd2e33c to your computer and use it in GitHub Desktop.
[Get the text that the user has selected] #javascript #js #selected #text
This file contains 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
/ Get the text that the user has selected | |
const getSelectedText = () => window.getSelection().toString(); | |
getSelectedText(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment