JiteshGaikwad / Chatbot-Widget

MIT License
255 stars 128 forks source link

How to add HTML link as a Bot Response. #9

Closed kapriman closed 3 years ago

kapriman commented 3 years ago

Could you please let me know how to add HTML as the bot response in this widget?

I have created html_attachment file, similar to pdf_attachment file, and modified the code wherever required. But I'm not getting any response.

For reference:


HTML Attachment


Also, created a file html_link.js:

/**


Added the above changes in chat.js as well:

// check if the custom payload type is "html_attachment" if (payload === "html_attachment") { renderhtmllink(response[i]); return;

Please let me know if i am missing anything here. Appreciate your help. Thanks in Advance :)