CDS.Markdown.Lite 1.5.5

dotnet add package CDS.Markdown.Lite --version 1.5.5
                    
NuGet\Install-Package CDS.Markdown.Lite -Version 1.5.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CDS.Markdown.Lite" Version="1.5.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CDS.Markdown.Lite" Version="1.5.5" />
                    
Directory.Packages.props
<PackageReference Include="CDS.Markdown.Lite" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CDS.Markdown.Lite --version 1.5.5
                    
#r "nuget: CDS.Markdown.Lite, 1.5.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CDS.Markdown.Lite@1.5.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CDS.Markdown.Lite&version=1.5.5
                    
Install as a Cake Addin
#tool nuget:?package=CDS.Markdown.Lite&version=1.5.5
                    
Install as a Cake Tool

CDS.Markdown Solution

CI CodeQL OpenSSF Scorecard NuGet License

CDS.Markdown is a comprehensive .NET library for both rendering and generating Markdown. It is designed for easy integration into your .NET 8 and .NET 10 applications.

Two packages

CDS.Markdown.Lite CDS.Markdown
Gives you MarkdownTextBox + the Fluent/Builder generation APIs Everything in CDS.Markdown.Lite, plus MarkdownViewer
Depends on Markdig only Markdig, Microsoft.Web.WebView2, and CDS.Markdown.Lite
Pick this when You only need prose-sized rendering or Markdown generation, and want to keep WebView2 out of your dependency tree entirely You need MarkdownViewer's full document fidelity (Mermaid, MathJax, real tables, images, links)

CDS.Markdown depends on CDS.Markdown.Lite, so installing CDS.Markdown still gets you MarkdownTextBox and the generation APIs too โ€” nothing is lost by installing the bigger package. Install CDS.Markdown.Lite on its own only when you specifically want to avoid the WebView2 dependency.

Features

  • ๐Ÿ–ฅ๏ธ WinForms Viewer Control (CDS.Markdown): A drop-in MarkdownViewer control powered by WebView2 and Markdig. Includes Light and Dark mode theme support.
  • โšก Lightweight Text Box Control (CDS.Markdown.Lite): MarkdownTextBox, a RichTextBox-based control for prose-sized Markdown (headings, formatting, lists, tables) with no WebView2 process and a synchronous preferred-height read โ€” a cheaper option when you're rendering many small fragments (e.g. chat bubbles) rather than a full document.
  • ๐Ÿ“ Programmatic Creation (CDS.Markdown.Lite): Generate Markdown dynamically using a clean Fluent API or a traditional Builder API.
  • ๐Ÿ”Œ Offline-First: Embedded resources for GitHub-style CSS, Mermaid.js diagrams, and MathJax (LaTeX math) mean no internet connection is required to render advanced Markdown.
  • ๐Ÿงช Fully Tested: Comprehensive unit test coverage ensuring reliable HTML generation and Markdown building.

Quick Start

1. Installation

Install whichever package matches what you need (see the table above):

dotnet add package CDS.Markdown.Lite
# or, for the full WebView2 viewer too:
dotnet add package CDS.Markdown

2. Viewing Markdown (WinForms)

Drop the MarkdownViewer control onto your form and load a file:

await markdownViewer1.LoadMarkdownAsync("readme.md");

๐Ÿ‘‰ Read the full Viewer Documentation

Or, for many small fragments rather than a full document, drop a MarkdownTextBox control onto your form instead โ€” this one only needs CDS.Markdown.Lite:

markdownTextBox1.SetMarkdown("**Hello**, world!");

See the "Embedding as a Fragment" section of the Viewer Documentation for the tradeoff between the two controls.

3. Generating Markdown (Fluent API)

Create structured Markdown programmatically without string wrangling:

var markdown = new FluentMarkdownDocument()
    .AddHeading("Hello, World!")
    .AddParagraph("This is a **bold** statement.")
    .AddBulletList(["First item", "Second item"])
    .AddMermaidDiagram("graph TD;\nA-->B;")
    .ToMarkdown();

๐Ÿ‘‰ Read the full Creation Documentation

Project Structure

  • CDS.Markdown.Lite: The lightweight library โ€” MarkdownTextBox and the Markdown generation APIs. Depends on Markdig only.
  • CDS.Markdown: The WebView2-based viewer control and its HTML-building pipeline. Depends on CDS.Markdown.Lite.
  • Demo: A sample WinForms application demonstrating the viewer, the text box, and the creation APIs.
  • UnitTests: MSTest project covering both packages โ€” HTML rendering, session management, MarkdownTextBox rendering, and Markdown generation.
  • UiTests: FlaUI project that drives the real Demo.exe end-to-end.

Documentation

Attributions

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed.  net10.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0-windows7.0

  • net8.0-windows7.0

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CDS.Markdown.Lite:

Package Downloads
CDS.Markdown

Easy-to-use .NET WinForms control for rendering full Markdown documents using WebView2 (MarkdownViewer). Also pulls in CDS.Markdown.Lite, so you still get MarkdownTextBox and the Markdown generation APIs. If you only need those, install CDS.Markdown.Lite instead to avoid the WebView2 dependency.

CDS.ScriptChat.WinForms

WinForms script+chat panel for the CDS.ScriptChat library. Host-agnostic: the script buffer is reached through caller-supplied delegates, with no dependency on any specific editor control.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.5 120 8/21/2026
1.5.4 125 8/20/2026

Initial public release.