Skip to content

A basic chrome extension that gets the HTML of the user's selection. This project can be easily extended to send the selection to a web service.

Notifications You must be signed in to change notification settings

savdb/Get-selected-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project provides an example for getting the HTML of the selected text in a Google Chrome extension.  There are two parts to the code: a content script and a background page.  The background page is unable to access the properties of the tab, so it must ask the content script to access it.  

From here, you can add on to the background.html page to do whatever you want with the text. I created a web service that will email the selected html to myself for reference.

About

A basic chrome extension that gets the HTML of the user's selection. This project can be easily extended to send the selection to a web service.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published