You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: false positive pdf link detection for www.pdf* websites (#16)
## Background
The anchor detection logic is currently detecting https://www.pdf* URLs
as "simplePDF urls" - this results in the editor opening and complaining
that the file is not a valid PDF.
This PR addresses this issue as well as some janitorial work.
## Changes
- [x] Fix the incorrect PDF detection
- [x] Update dependencies
- [x] Add test coverage
- [x] Add formatting
- [x] Swap yarn for NPM
- [x] Add Github action
- [x] **Publish @simplepdf/web-embed-pdf@1.8.3**
Also update dependencies, add tests coverage, drop yarn in favour of
npm, formatting
#### Let your customers pick the PDF on their computer
@@ -133,17 +135,18 @@ _Do not store sensitive information in the context (!!) as it is available local
133
135
134
136
```javascript
135
137
window.simplePDF.openEditor({
136
-
href:"publicly_available_url_pdf",
138
+
href:'publicly_available_url_pdf',
137
139
context: {
138
-
customer_id:"123",
139
-
environment:"prod",
140
+
customer_id:'123',
141
+
environment:'prod',
140
142
},
141
143
});
142
144
```
143
145
144
146
### Updating the configuration programmatically
145
147
146
148
**Use-cases:**
149
+
147
150
- Change the locale at run time
148
151
- Enabling / Disabling _Auto Open_: automatically opening the editor for anchor tags pointing to PDF files. By default enabled when SimplePDF is added as a script
0 commit comments