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) {
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log("Message sent: " + e.text);
}
});
</script>
Example - subscribing to the sendMessage event after initialization
<div id="chat"></div>
<script>
function chat_sendMessage(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log("Message sent: " + e.text);
}
$("#chat").kendoChat();
var chat = $("#chat").data("kendoChat");
chat.bind("sendMessage", chat_sendMessage);
</script>