react-annotate-text
v1.0.12
Published
A custom react component for annotating text content inside HTML
Downloads
63
Maintainers
Readme
react-annotate-text
A custom react component for annotating text content inside HTML
Installation
npm install react-annotate-text
Feel free to replace with yarn counterparts.
Usage
import ReactAnnoteText from "react-annotate-text";
<ReactAnnotateText
srcDoc={htmlContent}
src={htmlURL}
iframeTitle={"Demo"}
height={600}
width={500}
highlightData={highlightData}
selectionPopup={position => (
<button onClick={() => addHighlightClick(position)}>Add Highlight</button>
)}
hoverPopup={id => (
<button onClick={() => removeHighlightClick(id)}>Remove Highlight</button>
)}
/>
See example directory for complete code.
Contributing
- Install dependencies
npm install
- Start development server
npm start