[Solved] Chat posting messages associated with a template using v2026.1.212

1 Answer 18 Views
Chat
Euan
Top achievements
Rank 1
Iron
Euan asked on 24 Feb 2026, 11:17 AM

Hi,

I am currently trying to upgrade to Kendo UI JQuery v2026.1.212 and have noticed changes related to the way messages are posted to the chat. In previous versions (v2025.2.702) I could do the following:

function getChatUser(){
 return {
     id: kendo.guid(),
     name: "Admin",
     iconUrl: "/Images/chatIcon.svg"
 };
}    
 
 function postMessages(){
 const myChat = $("#chat").data("kendoChat");

 const myCustomTemplate = kendo.template($("#custom-template").html());
 kendo.chat.registerTemplate("custom", myCustomTemplate);

 const MD_MESSAGE = kendo.template("<div class='k-message'><div class='k-bubble fw-chat-bubble'>#= DOMPurify.sanitize(marked.parse(text)) #</div></div>");
 kendo.chat.registerTemplate("md_message", MD_MESSAGE);
 
myChat.renderMessage({
    type: "md_message",
    text: "**Hello** this is a text *markdown* message"
}, getChatUser());

 myChat.renderMessage({
     type: "custom",
     html: `<img src="/Images/chatIcon2.svg" width="400" height="350" alt="" />`
 }, getChatUser());

 }

How do I post messages to the chat referencing a template with v2026.1.212?

Thanks,

Euan

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 27 Feb 2026, 10:16 AM

Hi Euan,

The `registerTemplate` method has been deprecated. We encourage you to use one of the built-in templates or append elements manually.

To see the available template options:

1. Open the Chat API: https://www.telerik.com/kendo-jquery-ui/documentation/api/javascript/ui/chat

2. Filter by typing 'template'

Regards,
Nikolay
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Chat
Asked by
Euan
Top achievements
Rank 1
Iron
Answers by
Nikolay
Telerik team
Share this question
or