Hi Alessandro,
Rendering a clickable link requires a custom template as explained here:
<telerik:RadChat runat="server" ID="RadChat1">
<ClientEvents OnLoad="OnLoad" />
</telerik:RadChat>
<script>
var $ = $ || $telerik.$;
function OnLoad(sender, args) {
var Hyperlink_Card_Template = kendo.template($('#hyperlink-template').html());
kendo.chat.registerTemplate("hyperlink", Hyperlink_Card_Template);
var botUser = { name: "Chat bot" };
var postArgs = $.extend(true, {}, {
text: "some link text",
link: "https://google.com",
type: 'hyperlink',
timestamp: new Date(),
from: botUser
});
chat.renderMessage(postArgs, postArgs.from);
}
</script>
<script id="hyperlink-template" type="text/x-kendo-template">
<div class="#=styles.message#">
<time class="#=styles.messageTime#">#= kendo.toString(kendo.parseDate(timestamp), "HH:mm:ss") #</time>
<div class="#=styles.bubble#"><a href="#:link#">#:text#</a></div>
</div>
</script>
Also, you can subscribe to the button click and navigate instead of writing the URL.
Regards,
Peter Milchev
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.