@koredev/kore-web-sdk 11.18.0-rc.f92a18a → 11.18.0-rc.fbcaa35
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 +7 -3
- package/dist/esm/plugins/multi-file-upload.js +1 -1
- package/dist/esm/plugins/proactive-web-campaign.js +1 -1
- package/dist/plugins/proactiveWebCampaign/proactiveWebCampaign.d.ts +6 -1
- package/dist/umd/plugins/multi-file-upload.js +1 -1
- package/dist/umd/plugins/proactive-web-campaign.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -125,9 +125,9 @@ In addition to the kore message templates, new custom templates can be intstalle
|
|
|
125
125
|
```bash
|
|
126
126
|
class customTemplateComponent{
|
|
127
127
|
renderMessage(msgData){
|
|
128
|
-
if(msgData?.message[0]?.component?.payload?.template_type==='custom_stock_template'){
|
|
129
|
-
return '<h2>My Template HTML</h2>';
|
|
130
|
-
}else{
|
|
128
|
+
if (msgData?.message[0]?.component?.payload?.template_type === 'custom_stock_template') {
|
|
129
|
+
return '<h2 data-kr-msg-id=' + msgData.messageId + ' data-time=' + msgData.createdOnTimemillis + '>My Template HTML</h2>';
|
|
130
|
+
} else {
|
|
131
131
|
return false;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
@@ -137,6 +137,10 @@ chatWindowInstance.templateManager.installTemplate(new customTemplateComponent()
|
|
|
137
137
|
```
|
|
138
138
|
Other framework UI components like angular and react can also be injected with this
|
|
139
139
|
|
|
140
|
+
> [!NOTE]
|
|
141
|
+
> - Please add the following two attributes for parent div in the custom template html
|
|
142
|
+
> - `data-kr-msg-id` with value `msgData.messageId` and `data-time` with value `msgData.createdOnTimemillis`
|
|
143
|
+
|
|
140
144
|
## 💡 Plugins
|
|
141
145
|
|
|
142
146
|
Kore's chatwindow functionlity can be extended with the help of plugins.Newly created plugins can be installed with *installPlugin* method
|