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
•31 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 Change Laravel Forge Server Timezone?
1 year ago

How to Fetch API in Alpine.js
8 months ago

How to Disable New User Registration in Laravel
8 months ago

How to Define Computed Properties in Laravel Livewire
1 year ago

Run Tailwind CSS Online
11 months ago

Flutter Hello World and Number Counter Example
1 week ago