Skip to content

Commit 63b2f84

Browse files
committed
React Readme
1 parent 27ab3b6 commit 63b2f84

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

packages/pdf-annotator-react/README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,33 @@ export const App = () => {
2222
)
2323

2424
}
25-
```
25+
```
26+
27+
## Selection Popup
28+
29+
The `TextAnnotationPopup` from the Recogito Text Annotator package is fully compatible with the PDF annotator.
30+
31+
```jsx
32+
import { Annotorious } from '@annotorious/react';
33+
import { PDFAnnotator } from '@recogito/react-pdf-annotator';
34+
import { TextAnnotationPopup } from '@recogito/react-text-annotator';
35+
36+
export const App = () => {
37+
38+
return (
39+
<Annotorious>
40+
<PDFAnnotator
41+
pdfUrl="compressed.tracemonkey-pldi-09.pdf" />
42+
43+
<TextAnnotationPopup
44+
asPortal
45+
popup={props => (<div>Hello World</div>)} />
46+
</Annotorious>
47+
)
48+
49+
}
50+
```
51+
52+
## Hooks
53+
54+
The PDF annotator supports all Annotorious hooks, exactly [like the text annotator](https://github.com/recogito/text-annotator-js/tree/main/packages/text-annotator-react#hooks).

0 commit comments

Comments
 (0)