Skip to content

Commit f2c8f08

Browse files
committed
docs: add React integration example to SKILL.md
1 parent 3f00fb3 commit f2c8f08

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

agent-pdf/SKILL.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,29 @@ These features are configured by the portal owner in the SimplePDF admin console
121121
| `id` | Unique identifier for the upload (or `url-passthrough` for URL inputs) |
122122
| `url` | Direct link to open the PDF in the SimplePDF editor |
123123
| `iframe` | HTML snippet to embed the editor in a web page |
124-
| `react` | React component snippet using `EmbedPDF` from `@simplepdf/react-embed-pdf` |
124+
| `react` | React component snippet (see example below) |
125+
126+
### React integration
127+
128+
Requires `@simplepdf/react-embed-pdf` (`npm install @simplepdf/react-embed-pdf`):
129+
130+
```tsx
131+
import { EmbedPDF } from "@simplepdf/react-embed-pdf";
132+
133+
const PDFEditor = ({ documentURL }: { documentURL: string }) => (
134+
<EmbedPDF mode="inline" documentURL={documentURL} />
135+
);
136+
```
137+
138+
With a company-specific portal:
139+
140+
```tsx
141+
<EmbedPDF
142+
mode="inline"
143+
companyIdentifier="acme"
144+
documentURL="https://example.com/form.pdf"
145+
/>
146+
```
125147

126148
## Privacy
127149

0 commit comments

Comments
 (0)