# react-annotate-text

> A custom react component for annotating text content inside HTML

Latest version **1.0.12** (published 2019-11-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-annotate-text
pnpm add react-annotate-text
yarn add react-annotate-text
bun add react-annotate-text
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.12 |
| Published | 2019-11-23 |
| First published | 2019-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Agney Menon |
| Maintainers | howareyouami |
| Keywords | annotate, text, html, react, iframe, highlight, content |

## Links

- npm: https://www.npmjs.com/package/react-annotate-text
- Repository: https://github.com/agneym/react-annotate-text
- Homepage: https://github.com/agneym/react-annotate-text#readme
- Issues: https://github.com/agneym/react-annotate-text/issues
- npm.io page: https://npm.io/package/react-annotate-text

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.12 (latest) — 2019-11-23
- 1.0.11 — 2019-08-16
- 1.0.10 — 2019-08-16
- 1.0.9 — 2019-08-16
- 1.0.8 — 2019-08-16
- 1.0.7 — 2019-08-16
- 1.0.6 — 2019-08-16
- 1.0.5 — 2019-08-16
- 1.0.4 — 2019-08-03
- 1.0.3 — 2019-08-03
- 1.0.2 — 2019-08-03
- 1.0.1 — 2019-08-03
- 1.0.0 — 2019-08-02

## README

# react-annotate-text

<a href="https://www.npmjs.com/package/react-annotate-text">
  <img src="https://img.shields.io/npm/v/react-annotate-text.svg" />
</a>
<a href="https://prettier.io">
  <img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square">
</a>

A custom react component for annotating text content inside HTML

[Demo](https://howareyouami.github.io/react-annotate-text)

## Installation

```bash
npm install react-annotate-text
```

Feel free to replace with yarn counterparts.

## Usage

```javascript
import ReactAnnoteText from "react-annotate-text";
```

```javascript
<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

1. Install dependencies

```
npm install
```

2. Start development server

```
npm start
```

---
_Source: https://npm.io/package/react-annotate-text · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
