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

0 Answers 2 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

No answers yet. Maybe you can help?

Tags
Chat
Asked by
Euan
Top achievements
Rank 1
Iron
Share this question
or