OfficeIMO.Markdown
0.6.38
Prefix Reserved
dotnet add package OfficeIMO.Markdown --version 0.6.38
NuGet\Install-Package OfficeIMO.Markdown -Version 0.6.38
<PackageReference Include="OfficeIMO.Markdown" Version="0.6.38" />
<PackageVersion Include="OfficeIMO.Markdown" Version="0.6.38" />
<PackageReference Include="OfficeIMO.Markdown" />
paket add OfficeIMO.Markdown --version 0.6.38
#r "nuget: OfficeIMO.Markdown, 0.6.38"
#:package OfficeIMO.Markdown@0.6.38
#addin nuget:?package=OfficeIMO.Markdown&version=0.6.38
#tool nuget:?package=OfficeIMO.Markdown&version=0.6.38
OfficeIMO.Markdown - Markdown builder, reader, and HTML renderer
OfficeIMO.Markdown is the core Markdown package in the OfficeIMO family. It builds Markdown, parses Markdown into a typed document model, projects native AST snapshots for hosts, and renders HTML without external runtime dependencies.
If OfficeIMO saves you time, please consider supporting the work through GitHub Sponsors or PayPal.
Install
dotnet add package OfficeIMO.Markdown
Quick start
using OfficeIMO.Markdown;
var document = MarkdownDoc.Create()
.FrontMatter(new { title = "OfficeIMO.Markdown", tags = new[] { "docs", "reporting" } })
.H1("OfficeIMO.Markdown")
.P("Typed Markdown builder, reader, and HTML renderer for .NET.")
.Ul(list => list
.Item("Build Markdown with a fluent API")
.Item("Parse Markdown into typed blocks and inlines")
.Item("Render HTML fragments or full documents"))
.Code("powershell", "dotnet add package OfficeIMO.Markdown");
string markdown = document.ToMarkdown();
string htmlFragment = document.ToHtmlFragment();
string htmlDocument = document.ToHtmlDocument();
What it does
- Builds Markdown documents with headings, paragraphs, lists, task lists, tables, code blocks, callouts, details, front matter, footnotes, table-of-contents helpers, and semantic fenced blocks.
- Parses Markdown into a typed
MarkdownDocobject model with headings, blocks, inlines, anchors, source spans, front matter, and transform diagnostics. - Renders HTML fragments or full HTML documents with configurable profiles, CSS delivery, Prism options, Mermaid/chart/math shell assets, and safe defaults.
- Provides native AST projection for editor, transcript, chat, and document hosts that need stable block ids and DTO-style snapshots.
- Supports AOT-sensitive code paths through typed selectors and explicit overloads while leaving reflection helpers available for convenience scenarios.
Common tasks
Tables from typed objects
var results = new[] {
new { Name = "Alice", Role = "Dev", Score = 98.5 },
new { Name = "Bob", Role = "Ops", Score = 91.0 }
};
var document = MarkdownDoc.Create()
.H2("Team")
.Table(table => table.FromSequence(results,
("Name", item => item.Name),
("Role", item => item.Role),
("Score", item => item.Score)));
Parse and inspect headings
var parsed = MarkdownReader.Parse(File.ReadAllText("README.md"));
foreach (var heading in parsed.GetHeadingInfos()) {
Console.WriteLine($"{heading.Level}: {heading.Text} -> {heading.Anchor}");
}
Native AST snapshot
MarkdownNativeDocument native = MarkdownNativeDocument.Parse("""
# Investigation
See **CPU** in [dashboard](https://example.com).
""");
var snapshot = native.ToSnapshot();
Front matter, task lists, callouts, details, and TOC
var document = MarkdownDoc.Create()
.FrontMatter(new {
title = "Deployment checklist",
owner = "Platform",
tags = new[] { "runbook", "deployment" }
})
.H1("Deployment checklist")
.Toc(options => {
options.Title = "Contents";
options.MinLevel = 2;
options.MaxLevel = 3;
})
.H2("Pre-flight")
.Ul(list => list
.ItemTask("Packages published", done: true)
.ItemTask("Change approved")
.ItemTask("Rollback plan attached"))
.Callout("warning", "Freeze window", "Do not deploy outside the approved window.")
.Details("Rollback commands", body => body
.Code("powershell", "dotnet nuget locals all --clear"));
string markdown = document.ToMarkdown();
HTML fragments, full documents, and parts
var document = MarkdownDoc.Create()
.H1("Status")
.P(p => p.Text("Generated ").Bold("today").Text(" for the portal."))
.TableAuto(table => table
.Headers("Service", "Status", "Latency")
.Row("API", "Green", "42")
.Row("Jobs", "Yellow", "210"));
string fragment = document.ToHtmlFragment();
string fullPage = document.ToHtmlDocument();
HtmlRenderParts parts = document.ToHtmlParts();
Parse, inspect, and rewrite a document
var parsed = MarkdownReader.Parse(File.ReadAllText("README.md"),
MarkdownReaderOptions.CreateOfficeIMOProfile());
if (!parsed.HasHeading("Install")) {
parsed.H2("Install")
.Code("powershell", "dotnet add package OfficeIMO.Markdown");
}
foreach (var heading in parsed.GetHeadingInfos()) {
Console.WriteLine($"{heading.Level}: {heading.Text} -> #{heading.Anchor}");
}
File.WriteAllText("README.normalized.md", parsed.ToMarkdown());
Adjacent packages
| Package | Use it for |
|---|---|
| OfficeIMO.Markdown.Html | HTML to Markdown document conversion. |
| OfficeIMO.Markdown.Pdf | Markdown to PDF through OfficeIMO.Pdf. |
| OfficeIMO.MarkdownRenderer | WebView/browser-friendly shell rendering and incremental updates. |
| OfficeIMO.Word.Markdown | Word to/from Markdown conversion. |
| OfficeIMO.Markup | Markdown-inspired semantic authoring for OfficeIMO document outputs. |
Boundaries
OfficeIMO.Markdownowns the Markdown model, parser, writer, and HTML renderer.- PDF output belongs in
OfficeIMO.Markdown.Pdf. - HTML ingestion belongs in
OfficeIMO.Markdown.Html. - Host shell behavior belongs in
OfficeIMO.MarkdownRendererand host-specific plug-ins.
Deeper docs
Targets and license
- Targets:
netstandard2.0,net8.0,net10.0. - License: MIT.
- Repository: EvotecIT/OfficeIMO
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (8)
Showing the top 5 NuGet packages that depend on OfficeIMO.Markdown:
| Package | Downloads |
|---|---|
|
OfficeIMO.Markdown.Html
HTML converter for OfficeIMO.Markdown - Convert HTML fragments or documents into OfficeIMO.Markdown documents and Markdown text. |
|
|
OfficeIMO.Word.Markdown
Markdown converter for OfficeIMO.Word - Convert Word documents to/from Markdown using OfficeIMO.Markdown |
|
|
OfficeIMO.Reader
Unified, read-only document extraction facade for OfficeIMO (Word/Excel/PowerPoint/Markdown/PDF) intended for AI ingestion. |
|
|
OfficeIMO.MarkdownRenderer
WebView-friendly Markdown rendering helpers (shell + incremental updates) built on OfficeIMO.Markdown. |
|
|
HtmlForgeX.Markdown
Advanced Markdown integration for HtmlForgeX powered by OfficeIMO.Markdown. Maps Markdown blocks to HtmlForgeX elements and registers libraries via HtmlForgeX. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on OfficeIMO.Markdown:
| Repository | Stars |
|---|---|
|
EvotecIT/PSWriteOffice
PowerShell Module to create and edit Microsoft Word, Microsoft Excel, and Microsoft PowerPoint documents without having Microsoft Office installed.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 0.6.38 | 137 | 6/27/2026 |
| 0.6.37 | 75 | 6/27/2026 |
| 0.6.36 | 761 | 6/24/2026 |
| 0.6.35 | 761 | 6/23/2026 |
| 0.6.34 | 1,105 | 6/21/2026 |
| 0.6.33 | 959 | 6/16/2026 |
| 0.6.32 | 1,032 | 6/16/2026 |
| 0.6.31 | 1,099 | 6/15/2026 |
| 0.6.30 | 963 | 6/13/2026 |
| 0.6.29 | 1,414 | 6/12/2026 |
| 0.6.28 | 758 | 6/9/2026 |
| 0.6.27 | 984 | 6/5/2026 |
| 0.6.26 | 959 | 5/27/2026 |
| 0.6.25 | 662 | 5/26/2026 |
| 0.6.24 | 616 | 5/26/2026 |
| 0.6.23 | 1,037 | 5/23/2026 |
| 0.6.22 | 648 | 5/22/2026 |
| 0.6.21 | 603 | 5/21/2026 |
| 0.6.20 | 600 | 5/21/2026 |
| 0.6.19 | 681 | 5/20/2026 |
0.6.0: adds semantic fenced-block AST support, fenced block extension APIs, improved quoted/container fence handling, and HTML parts/asset workflows aligned for downstream HTML-to-Markdown and host integrations.