From 4b7224ac5b9cdb2ea55db38c5d209495e5574aed Mon Sep 17 00:00:00 2001 From: Sudhakar Rayavaram Date: Fri, 15 Mar 2024 18:33:56 +0530 Subject: [PATCH] #doc : Add missing documentation for enableUpload flag The README missed explaining the newly added flag enableUpload details. Added that for the benefit of new users --- README.md | 6 ++++++ dev/init.js | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 08c80b6..8c898c7 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ TarkaChat.init({ themeColor: "#F0DAFB", selectorId: "chatbot", expand: true, + enableUpload: true, preChatRenderer: function (onClose) { // Return a DOM Node that can be attached to the chatbot UI // Use the onClose callback to close the pre-chat screen @@ -48,6 +49,7 @@ where, - [Optional] **title** is the title of the chatbot window - [Optional] **botName** will be displayed below each bot message - [Optional] **expand** opens the chat window in expanded mode on init when set to true, otherwise opens in collapse mode. Defaults to false. +- [Optional] **enableUpload** will show the option to upload a file when set to true. False by default - **greeting** will be the first message displayed on the chatbot when opened for the first time - **themeColor** will set the color scheme of the chat window - **selectorId** the DOM element selector (id) inside which the bot will be rendered @@ -126,6 +128,10 @@ where, Demo is deployed from the application code in `demo/` folder. Link: https://tarkalabs.github.io/tarka-chat/demo/ +## Dev notes + +If you wanted to run this code in your local for development purposes, Run the following command from project root folder `yarn dev` and open `dev/index.html` in your browser to see the chat window. Your local changes will be hot reloaded + ## Old versions - v1.1 : https://d1fmfone96g0x2.cloudfront.net/tarka-chat-1.1.umd.js diff --git a/dev/init.js b/dev/init.js index a833eaa..6a5841f 100644 --- a/dev/init.js +++ b/dev/init.js @@ -105,7 +105,6 @@ const chat = TarkaChat.init({ greeting: "Hello. How can I assist you today?", themeColor: "#F0DAFB", selectorId: "tarkachatbot", - enableUpload: true, uploadTypes: UPLOAD_TYPES, generateUploadPreview: generateImageThumbnail, preChatRenderer: getPreChatScreen,