HTML is not supported in Web Chat

Client side HTML rendering is not rendered for official Web Chat channels. Web Chat is intended to support markdown, and while markdown itself can support in-line HTML, this was not an intended feature for the Web Chat in the Bot Framework.

Markdown in-line HTML

Why isn’t HTML ¬†supported?

The primary reason behind this decision was to ensure a consistency of UI behavior for our customers, and minimize channel disparity. From a technical stand point, on the server side, bot messages were prone to more bugs or inconsistent behavior due to the nature of using carats ( <, >) and quotes (” “).

Need HTML?

If HTML rendering in Web Chat is a critical feature for your applications, you can clone or fork a copy of the Web Chat source code from GitHub, and enable it (on your own custom Web Chat client).

This is easily done by editing the source code in FormattedText.tsx

const markdownIt = new MarkdownIt({ html: false, linkify: true, typographer: true });

To enable HTML support, simple change ‘html : false’ to ‘html : true’. Moving forward, the official Web Chat by default will set this to false.

Web Chat open source on GitHub available here.

Thank you!

The Bot Framework team.