Markdown round trip
Edit source and document content
Load the Markdown source into the Document Editor. Make rich-text changes there, then export the current document back to Markdown.
Server conversion
LoadMarkdownMarkdown to editable document
SaveMarkdownEditable document to Markdown
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Use Markdown in document workflows
TXTextControl.Markdown.Core bridges compact Markdown content and fully editable TX Text Control documents. The browser only coordinates the round trip; conversion happens in ServerTextControl.
Key members
Import Markdown
ServerTextControl.LoadMarkdown
Export Markdown
ServerTextControl.SaveMarkdown
Exchange the live document
TXTextControl.loadDocument / saveDocument
How it works
For loading, the controller passes the posted Markdown to LoadMarkdown and returns the resulting Internal Unicode Format document. The browser loads that data into the existing editor session.
For saving, the browser serializes the live editor document. The controller opens it in a new ServerTextControl instance and calls SaveMarkdown. The returned source replaces the text in the Markdown editor and can be downloaded as a standard .md file.
textControl.LoadMarkdown(markdown);
textControl.Save(out byte[] document, BinaryStreamType.InternalUnicodeFormat);
textControl.Load(document, BinaryStreamType.InternalUnicodeFormat);
string markdown = textControl.SaveMarkdown();
NuGet packages
TXTextControl.TextControl.Core.SDK
34.0.4
Provides the core document model and server-side document processing APIs.
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.4
Converts Markdown to and from TX Text Control document formats.
dotnet add package TXTextControl.Markdown.Core --version 34.1.0
Provides the browser-based TX Text Control document editor and JavaScript API.
dotnet add package TXTextControl.Web --version 34.4.0
TXTextControl.Web.DocumentEditor.Backend
34.4.0
Hosts the WebSocket-based backend used by the browser document editor.
dotnet add package TXTextControl.Web.DocumentEditor.Backend --version 34.4.0
Source files
See the implementation
The conversion endpoints, browser callbacks, UI, and Markdown sample live together in Demos/ServerSideProcessing/Markdown.