I have spent several hours searching the web for solutions. What I would like to do is take the highlighted text on a page and transfer it to a textarea in the popup.html of
popup.js
chrome.tabs.executeScript( { code: "window.getSelection().toString();" }, function(selection) { alert(selection[0]); });
manifest.json
"permissions": [ "activeTab", ],
Have a look at this simple extension https://github.com/kelly-apollo/zdic