easea-app-widget 1.8.1 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -1
- package/dist/widget/index.es.js +22141 -24647
- package/dist/widget/index.iife.js +246 -336
- package/dist/widget/index.umd.js +246 -336
- package/package.json +2 -5
package/README.md
CHANGED
|
@@ -87,7 +87,23 @@ window.EaseaWidget?.init({
|
|
|
87
87
|
|
|
88
88
|
- `key` (string, required): widget key provided by Easea App.
|
|
89
89
|
- `lang` (string, optional): UI language. Examples: `it`, `en`. If omitted, the widget will try to detect the host website language; if it’s not yet supported among the available ones, the default language will be used.
|
|
90
|
-
- `targetElementId` (string, optional): id of an element
|
|
90
|
+
- `targetElementId` (string, optional): id of an element on your page (e.g. your own `<button id="book">`). Clicking anything inside it opens the widget, and the floating «Book» button is hidden. Use it when your button is not a link.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### Open the widget from your own «Book» button
|
|
95
|
+
|
|
96
|
+
Any link whose address ends with `#prenota-easea` opens the widget instead of navigating:
|
|
97
|
+
|
|
98
|
+
```html
|
|
99
|
+
<a href="#prenota-easea">Prenota</a>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
- Works on every link on the page (header, menu, footer): repeat it on each one.
|
|
103
|
+
- Also works when the page is opened with `#prenota-easea` in the URL (e.g. `https://yoursite.com/#prenota-easea`).
|
|
104
|
+
- Must be a link (`<a href>`). For a `<button>` without a link, use `targetElementId` instead.
|
|
105
|
+
- When «Use my button» is chosen in the Easea dashboard (Connections › Widget) and such a link is on the page, the floating «Book» button is not shown. If the link is missing, the floating button stays, so the widget is never unreachable.
|
|
106
|
+
- Requires widget **1.9.0+**.
|
|
91
107
|
|
|
92
108
|
Technical notes:
|
|
93
109
|
|