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:
parent
662bb882f7
commit
e8912655a5
3 changed files with 11 additions and 1 deletions
|
@ -13,6 +13,7 @@ const runSDK = ({ baseUrl, websiteToken }) => {
|
|||
websiteToken,
|
||||
locale: chatwootSettings.locale,
|
||||
type: getBubbleView(chatwootSettings.type),
|
||||
launcherTitle: window.chatwootSettings.launcherTitle || '',
|
||||
|
||||
toggle() {
|
||||
IFrameHelper.events.toggleBubble();
|
||||
|
|
|
@ -113,7 +113,7 @@ export const IFrameHelper = {
|
|||
},
|
||||
|
||||
setBubbleLabel(message) {
|
||||
setBubbleText(message.label);
|
||||
setBubbleText(window.$chatwoot.launcherTitle || message.label);
|
||||
},
|
||||
|
||||
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
|
||||
|
||||
```js
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue