sendMessage

Fires when a message is posted through the Chat message box.

Event Data

e.sender kendo.ui.Chat

The widget instance which fired the event.

e.text String

The text value that was entered in the message box.

Example - subscribing to the sendMessage event during initialization

<div id="chat"></div>
<script>
$("#chat").kendoChat({
    sendMessage: function(e) {
        console.log("Message sent: " + e.text);
    }
});
</script>

Example - subscribing to the sendMessage event after initialization

<div id="chat"></div>
<script>
function chat_sendMessage(e) {
    console.log("Message sent: " + e.text);
}
$("#chat").kendoChat();

var chat = $("#chat").data("kendoChat");
chat.bind("sendMessage", chat_sendMessage);
</script>
In this article
Not finding the help you need? Improve this article