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) {
        console.log("Post: " + e.text);
    }
});
</script>

Example - subscribing to the post event after initialization

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

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