post

Fired when a message is posted to the chat widget. This can be either through the message box, or 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 current chat user info. This contains the id, name and iconUrl set to the chat instance.

Example - subscribe to the "post" event during initialization

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

Example - subscribe 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