Skip to main content

readonly

readonly?: boolean;

Controls whether the chatbot widget is in read-only mode. When set to true, users cannot modify the data; when set to false, users can make changes. The property is set to false by default.

Example of usage:

const chat = new ChatBot(node, { readonly: true });

How to allow or deny data changes

To dynamically change the read-only state after initialization, use the setConfig method:

const chat = new ChatBot(node);
chat.setConfig({ readonly: true });

Get current state of data change permission

To retrieve the current state of the read-only configuration:

const chat = new ChatBot(node, { readonly: true });
const isReadOnly = chat.getConfig().readonly;