TXTextControl.Markdown.Core
33.0.0-beta.2
Prefix Reserved
dotnet add package TXTextControl.Markdown.Core --version 33.0.0-beta.2
NuGet\Install-Package TXTextControl.Markdown.Core -Version 33.0.0-beta.2
<PackageReference Include="TXTextControl.Markdown.Core" Version="33.0.0-beta.2" />
<PackageVersion Include="TXTextControl.Markdown.Core" Version="33.0.0-beta.2" />
<PackageReference Include="TXTextControl.Markdown.Core" />
paket add TXTextControl.Markdown.Core --version 33.0.0-beta.2
#r "nuget: TXTextControl.Markdown.Core, 33.0.0-beta.2"
#:package TXTextControl.Markdown.Core@33.0.0-beta.2
#addin nuget:?package=TXTextControl.Markdown.Core&version=33.0.0-beta.2&prerelease
#tool nuget:?package=TXTextControl.Markdown.Core&version=33.0.0-beta.2&prerelease
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
(propertyCssSaveMode
)TXTextControl.CssSaveMode
(valueInline
)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
, orTitle1
→H1
- Map
Quote
orCitation
→BLOCKQUOTE
- Map
Strong Emphasis
→STRONG
- Map
CaptionText
→CAPTION
(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 | Versions 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. |
-
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 |