feat: Allow user to change the bubble title using SDK (#1155)
- Allow user to change the bubble title using SDK - Add docs for enabling expanded bubble
This commit is contained in:
@@ -13,6 +13,7 @@ const runSDK = ({ baseUrl, websiteToken }) => {
|
|||||||
websiteToken,
|
websiteToken,
|
||||||
locale: chatwootSettings.locale,
|
locale: chatwootSettings.locale,
|
||||||
type: getBubbleView(chatwootSettings.type),
|
type: getBubbleView(chatwootSettings.type),
|
||||||
|
launcherTitle: window.chatwootSettings.launcherTitle || '',
|
||||||
|
|
||||||
toggle() {
|
toggle() {
|
||||||
IFrameHelper.events.toggleBubble();
|
IFrameHelper.events.toggleBubble();
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export const IFrameHelper = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
setBubbleLabel(message) {
|
setBubbleLabel(message) {
|
||||||
setBubbleText(message.label);
|
setBubbleText(window.$chatwoot.launcherTitle || message.label);
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleBubble: () => {
|
toggleBubble: () => {
|
||||||
|
|||||||
@@ -37,6 +37,15 @@ Chatwoot support 2 designs for for the widget
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
If you are using expanded bubble, you can customize the text used in the bubble by setting `launcherText` parameter on chatwootSettings as described below.
|
||||||
|
|
||||||
|
```js
|
||||||
|
window.chatwootSettings = {
|
||||||
|
type: 'expanded_bubble',
|
||||||
|
launcherText: 'Chat with us'
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### To trigger widget without displaying bubble
|
### To trigger widget without displaying bubble
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|||||||
Reference in New Issue
Block a user