TXTextControl.Markdown.Core 33.0.0-beta.2

Prefix Reserved
This is a prerelease version of TXTextControl.Markdown.Core.
dotnet add package TXTextControl.Markdown.Core --version 33.0.0-beta.2
                    
NuGet\Install-Package TXTextControl.Markdown.Core -Version 33.0.0-beta.2
                    
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="TXTextControl.Markdown.Core" Version="33.0.0-beta.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TXTextControl.Markdown.Core" Version="33.0.0-beta.2" />
                    
Directory.Packages.props
<PackageReference Include="TXTextControl.Markdown.Core" />
                    
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 TXTextControl.Markdown.Core --version 33.0.0-beta.2
                    
#r "nuget: TXTextControl.Markdown.Core, 33.0.0-beta.2"
                    
#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 TXTextControl.Markdown.Core@33.0.0-beta.2
                    
#: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=TXTextControl.Markdown.Core&version=33.0.0-beta.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=TXTextControl.Markdown.Core&version=33.0.0-beta.2&prerelease
                    
Install as a Cake Tool

TXTextControl.Markdown.Core

TXTextControl.Markdown.Core is a .NET 8 library that provides a public interface for converting between Markdown and TX Text Control documents. It enables seamless integration of Markdown import and export functionality with TX Text Control, a powerful word processing component for .NET applications.

It works with:

  • TXTextControl.ServerTextControl (.NET, ASP.NET Core)
  • TXTextControl.TextControl (WinForms)
  • TXTextControl.WPF.TextControl (WPF)

Features

  • Import Markdown content into a TX Text Control document
  • Export TX Text Control document content as Markdown
  • Simple and intuitive API

Install

dotnet add package TXTextControl.Markdown.Core

Targets: net8.0

Namespace to import:

using TXTextControl.Markdown;

Quick start

// Server (ASP.NET Core / services)
using TXTextControl;
using TXTextControl.Markdown;

using var tx = new ServerTextControl();
tx.Create();

tx.LoadMarkdown("# Hello from Markdown");
string md = tx.SaveMarkdown();
// or:
tx.SaveMarkdown(out var mdOut);

Requirements

  • A TX Text Control instance at runtime (ServerTextControl, TextControl, or WPF.TextControl), created by your app.
  • .NET net8.0.

Trimming / AOT (NativeAOT, PublishTrimmed)

If you publish trimmed or AOT, reflection needs the TX Text Control members preserved. Options:

  • Use the package as-is with its buildTransitive trimming descriptor (if included in your version).
  • Or add your own linker config to keep:
    • TXTextControl.StringStreamType
    • TXTextControl.SaveSettings (property CssSaveMode)
    • TXTextControl.CssSaveMode (value Inline)
    • Load/Save on your control types

Limitations

  • Only basic Markdown features are supported including:
    • Headings
    • Paragraphs
    • Horizontal rules
    • Blockquote
    • Lists
    • Images
    • Links
    • Tables

Supported Styles

The following style names are supported and will be exported to Markdown. They get converted to the proper Markdown syntax. Inline formatting is additionally converted to Markdown.

Paragraph styles:

  • BODY
  • H1
  • H2
  • H3
  • H4
  • H5
  • H6
  • BLOCKQUOTE

Inline styles:

  • TH
  • PRE
  • STRONG
  • EM
  • CAPTION
  • CODE
  • A
  • KBD
  • DEL
  • S
  • STRIKE

Style to Markdown Mapping

Style Markdown Syntax Example
BODY Regular paragraph text
H1 # Heading 1
H2 ## Heading 2
H3 ### Heading 3
H4 #### Heading 4
H5 ##### Heading 5
H6 ###### Heading 6
BLOCKQUOTE > Blockquote
TH | Header | in tables
PRE ```code block```
STRONG / B **Bold text**
EM / I / CAPTION *Italic text*
CODE `inline code`
A [Link text](url)
KBD `Ctrl+C`
DEL / S / STRIKE ~~Strikethrough~~

Handling Different Style Names

When converting documents from formats such as DOCX, RTF, or HTML to Markdown, the style names in the source document may differ from the supported style names listed above.
In this case, you should map custom styles to supported Markdown styles before conversion.

For example:

  • Map Heading 1, Überschrift 1, or Title1H1
  • Map Quote or CitationBLOCKQUOTE
  • Map Strong EmphasisSTRONG
  • Map CaptionTextCAPTION (which is converted to italic Markdown)

This mapping can be done by:

  • Normalizing style names in the TX Text Control document before calling SaveMarkdown
  • Applying a custom mapping layer in your code that translates document-specific styles to the supported names

If a style is not mapped, it will be exported as plain text without Markdown formatting.


Versioning

This package binds to TX Text Control's public method and enum names. If those change in a future major TX Text Control release, update this package accordingly.


License

Redistribution and use in source and binary forms, with or without modification, are permitted with a valid license of TX Text Control.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
33.0.0-beta.2 195 9/19/2025
33.0.0-beta.1 251 9/16/2025