Is it possible to show formatted HTML Content inside a Bot Card/Attachment? In this Case, we retrieve the content field of a Dynamics 365 CRM Knowledge Article which is in HTML Format and want to show it to the bot user.
1
votes
1 Answers
0
votes
Most of the channels in the Bot Framework don't support HTML rendering. You may refer to this issue: Can a .html file be rendered in cards and HTML should be sanitized in messages.
One alternative way is that to extract information from your html and create cards to show them, to create cards in Bot Framework, please refer to the official Rich Cards Bot Sample for .NET SDK / Rich Cards Bot Sample for node.js SDK.
Another approach is that we use markdown to make a hyperlink to your html.
For example, in C#, you can simply code like this:
var text = @"[Google Search](http://www.google.com)";
await context.PostAsync(text);
But markdown is not supported by all channels too, you may refer to this Bot Framework markdown support by channel for more information.
