Markdown Support

Overview

Wisej.NET 4 now offers Markdown support alongside HTML. This enhancement benefits Wisej.AI by aligning with the preferences of LLMs for formatting responses in Markdown.

The conversion from Markdown to HTML occurs server-side, ensuring the browser receives HTML data without client-side JavaScript conversion.

For developers, we've added the AllowMarkdown property to complement the existing AllowHtml property. We also provide the System.Markdown class with a ToHtml(string) method. This method lets applications convert Markdown text to HTML format at any point.

How to Use

To use Markdown in your application, set the AllowMarkdown property to "true". Then assign the Markdown text to the "Text" property for standard controls, or to the "Value" property for DataGridViewCell objects.

The example below shows a button in the designer and the "Text" property editor. You can mix Markdown and HTML.

To convert Markdown to HTML programmatically, use the Markdown.ToHtml(text) method from the System.Markdown class:

this.label1.AllowHtml = true;
this.label1.Text = Markdown.ToHtml("**Bold**");

Last updated

Was this helpful?