Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft Bot Framework - Webchat text as html

Tags:

botframework

I'm using Microsoft Bot Framework (Node JS), with Webchat channel. The webchat shows HTML tags as plain text ("<br> bla bla <br>") while I want it to be rendered.

enter image description here

There is any way to make it render the HTML tags?

like image 858
Sahar Ben-Shushan Avatar asked Jun 14 '26 13:06

Sahar Ben-Shushan


1 Answers

Microsoft Bot Framework supports only 2 types of text format:

  • Markdown
  • XML (The textFormat xml is supported only by the Skype channel.)

Hence it is normal that you don't have what you wanted.

See documentation here: https://learn.microsoft.com/en-us/bot-framework/bot-service-channel-inspector#text-formatting

As a consequence, you have to transform your html to markdown to get your intended output, but you will be limited to the capabilities of markdown and the restrictions of markdown rendering in the channels.

You can check markdown rendering by channel here: https://docs.botframework.com/en-us/channel-inspector/channels/WebChat?f=Markdown&e=example1

like image 112
Nicolas R Avatar answered Jun 18 '26 00:06

Nicolas R



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!