Annotating or fetching selected text content using React
<p>I'm trying to build a chrome extension using React and I could not figure out how I can get selected web content into my extension app. I am going to use it for creating annotations on the web content.</p>

<p>To give an example, User visits a web page, selects a text or whole paragraph and the extension will be able to get the content of selected text. I am going to highlight the text and show the user comment then. (e.g. <a href="http://medium.com" rel="nofollow noreferrer">medium.com</a>'s annotation model)</p>

<p>I've tried <a href="http://annotatorjs.org/" rel="nofollow noreferrer">AnnotatorJS</a> but I cannot annotate the content outside of my application context.</p>

<p>What can be the accurate way for implementing annotations in React?</p>