const getSelectedText = () => window.getSelection().toString(); console.log(getSelectedText());
How to Get the User Selection Text on a Web Page
Learn how to get the user selection text on a web page the easy way
Created on Jun 28, 2022
•105 views
If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️
Load comments for How to Get the User Selection Text on a Web Page
PostSrc Code Components
Collection of Tailwind CSS components for everyone to use. Browse all of the components that are right for your project.
View ComponentsSponsors 👑
+ Add YoursOther Code Snippets
All SnippetsHow to Customize Default Error Pages in Laravel 8
2 years ago
How to Push Stacks Only Once in Laravel
2 years ago
How to Integrate Sentry with Laravel Nova
2 years ago
How To Add Google Analytics 4 to Inertia JS Laravel
1 year ago
How to Use Multiple Databases in Laravel Project
2 years ago
Vue Js Long Press Directive
2 years ago