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
•49 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 Snippets
How to Update App URL in Laravel
1 year ago

How to Check For Two isset in Laravel Blade Views
1 year ago

How to Create Model, Migration and Controller Using Single Artisan Command in Laravel
1 year ago

How to Bulk Insert Using Eloquent ORM In Laravel
1 year ago

How to Delete Directory In Laravel Storage
1 year ago

Build Nested Collpsing Component in Alpine Js Using Collapse Plugin
1 year ago