post

Fires when a message is posted to the Chat. Can be either through the message box, or through an action button click.

Event Data

e.sender kendo.ui.Chat

The widget instance which fired the event.

e.text String

The text value that was posted.

e.timestamp Date

The current time of posting the message.

e.from Object

The user information for the current chat. Contains the id, name, and iconUrl that are set to the Chat instance.

Example - subscribing to the post event during initialization

<div id="chat"></div>
<script>
$("#chat").kendoChat({
    post: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
        console.log("Post: " + e.text);
    }
});
</script>

Example - subscribing to the post event after initialization

<div id="chat"></div>
<script>
function chat_post(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("Post: " + e.text);
}
$("#chat").kendoChat();

var chat = $("#chat").data("kendoChat");
chat.bind("post", chat_post);
</script>
In this article