Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Document-Processing/Markdown/Conversions/html-conversions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ documentation: UG

# Markdown to HTML and HTML to Markdown Conversions

Markdown is a lightweight markup language that adds formatting elements to plain text documents. The .NET Word library supports the conversion of Markdown to HTML document and vice versa.
Markdown is a lightweight markup language that adds formatting elements to plain text documents. The Syncfusion<sup>&reg;</sup> .NET Word (DocIO) library supports converting Markdown to an HTML document and vice versa.

## Assemblies and NuGet packages required

Refer to the following links for assemblies and NuGet packages required based on platforms to convert between Markdown and HTML documents using the .NET Word Library.
Refer to the following links for the assemblies and NuGet packages required, based on the target platform, to convert between Markdown and HTML documents using the .NET Word Library.

* [Markdown conversions assemblies](https://help.syncfusion.com/document-processing/word/word-library/net/assemblies-required)
* [Markdown conversions NuGet packages](https://help.syncfusion.com/document-processing/word/word-library/net/nuget-packages-required)
Expand Down Expand Up @@ -40,15 +40,15 @@ using (WordDocument document = new WordDocument(Path.GetFullPath("Input.md")))
//Open an existing Markdown file.
using (WordDocument document = new WordDocument("Input.md"))
{
//Save as a HTML document.
//Save as an HTML document.
document.Save("Output.html");
}
{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
'Open an existing Markdown file.
Using document As WordDocument = New WordDocument("Input.md")
'Save as a HTML document.
'Save as an HTML document.
document.Save("Output.html")
End Using
{% endhighlight %}
Expand Down Expand Up @@ -172,7 +172,7 @@ End Sub

{% endtabs %}

N> Hook the event handler before opening a Markdown document as per the above code example.
N> Hook the event handler before opening a Markdown document as shown in the above code example.

### Encoding

Expand Down Expand Up @@ -282,20 +282,20 @@ The following code example illustrates how to save Image files during an HTML to
{% endhighlight %}

{% highlight c# tabtitle="C# [Windows-specific]" %}
//Open an existing HTML document.
//Open an existing HTML document.
using (WordDocument document = new WordDocument(@"Input.html"))
{
//Hook the event to customize the image.
//Hook the event to customize the image.
document.SaveOptions.MarkdownSaveOptions.ImageNodeVisited += SaveImage;
//Save an HTML document as a Markdown file.
document.Save("HtmlToMd.md", FormatType.Markdown);
}
{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
'Open an existing HTML document.
'Open an existing HTML document.
Using document As WordDocument = New WordDocument("Input.html")
'Hook the event to customize the image.
'Hook the event to customize the image.
document.SaveOptions.MarkdownSaveOptions.ImageNodeVisited += SaveImage
'Save an HTML document as a Markdown file.
document.Save("HtmlToMd.md", FormatType.Markdown)
Expand Down
6 changes: 3 additions & 3 deletions Document-Processing/Markdown/Conversions/markdown-to-pdf.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ documentation: UG

# Markdown to PDF Conversion

Markdown is a lightweight markup language that adds formatting elements to plain text documents. The .NET Word library supports the conversion of Markdown to PDF document.
Markdown is a lightweight markup language that adds formatting elements to plain text documents. The .NET Word library supports the conversion of Markdown to a PDF document.

## Assemblies and NuGet packages required

Expand All @@ -21,7 +21,7 @@ Refer to the following links for assemblies and NuGet packages required based on

Convert an existing markdown file to a PDF document using the .NET Word library.

The following code example shows how to convert Markdown to PDF document.
The following code example shows how to convert a Markdown file to a PDF document.

N> Refer to the appropriate tabs in the code snippets section: ***C# [Cross-platform]*** for ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI; ***C# [Windows-specific]*** for WinForms and WPF; ***VB.NET [Windows-specific]*** for VB.NET applications.

Expand Down Expand Up @@ -88,7 +88,7 @@ When opening an existing Markdown document, the .NET Word library provides custo

The .NET Word library provides an `ImageNodeVisited` event, which customizes image data while importing a Markdown file. Implement the logic to customize the image data by using this `ImageNodeVisited` event.

The following code example shows how to load image data based on the image source path when importing the Markdown files.
The following code example shows how to load image data based on the image source path when importing the Markdown file.

{% tabs %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ control: Markdown
documentation: UG
---

# Assemblies Required for Markdown
# Assemblies Required for .NET Markdown Library

The following assemblies need to be referenced in your application to use the .NET Markdown library.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ documentation: UG

# Loading and Saving a Markdown Document

The Syncfusion<sup>&reg;</sup> Markdown library allows you to load an existing Markdown document and save it to the file system or stream programmatically.
The Syncfusion<sup>&reg;</sup> .NET Markdown library allows you to load an existing Markdown document and save it to the file system or stream programmatically.

## Namespaces required

The following namespaces of Essential<sup>&reg;</sup> Markdown need to be included in your application to load and save the Markdown document.
The following namespaces need to be included in your application to load and save a Markdown document.

N> Refer to the appropriate tabs in the code snippets section: ***C#*** for ASP.NET Core, Blazor, ASP.NET MVC, UWP, .NET MAUI, WinUI, WinForms and WPF; ***VB.NET*** for VB.NET applications.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ control: Markdown
documentation: UG
---

# NuGet Packages Required for Markdown Library
# NuGet Packages Required for .NET Markdown Library

## Installing Syncfusion<sup>&reg;</sup> Markdown through NuGet Packages

NuGet is the one of the easiest way to download and install Markdown library to create, read, and edit the Markdown documents. The following NuGet packages need to be installed in your application.
NuGet is one of the easiest ways to download and install the Markdown library to create, read, and edit Markdown documents. The following NuGet package needs to be installed in your application.

<table>
<thead>
Expand Down Expand Up @@ -44,7 +44,7 @@ N> 2. Starting with v34.x.x, if you reference Syncfusion® assemblies from trial

## NuGet Package Installation and Uninstallation

To use Syncfusion<sup>&reg;</sup> NuGet packages in your project, please refer the NuGet Package [Installation](https://help.syncfusion.com/extension/syncfusion-nuget-packages/nuget-packages) and [Uninstallation](https://help.syncfusion.com/extension/syncfusion-nuget-packages/nuget-uninstallation-process#) sections.
To use Syncfusion<sup>&reg;</sup> NuGet packages in your project, refer to the NuGet package [Installation](https://help.syncfusion.com/extension/syncfusion-nuget-packages/nuget-packages) and [Uninstallation](https://help.syncfusion.com/extension/syncfusion-nuget-packages/nuget-uninstallation-process#) sections.

Markdown NuGet packages can be installed and uninstalled using Package Manager Console.

Expand Down
4 changes: 2 additions & 2 deletions Document-Processing/Markdown/Markdown-Library/NET/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ documentation: UG
---
# Overview of Syncfusion<sup>&reg;</sup> Markdown library

Essential<sup>&reg;</sup> Markdown Document Processing library is a native .NET Markdown library that is used by developers to create, read, edit, and manage Markdown documents by using C#, VB.NET, and managed C++ code from any of the following .NET platforms — Windows Forms, WPF, ASP.NET MVC, ASP.NET Core, Blazor, and .NET MAUI applications.
Essential<sup>&reg;</sup> Markdown Document Processing library is a native .NET library used by developers to create, read, edit, and manage Markdown documents in C# and VB.NET from Windows Forms, WPF, ASP.NET MVC, ASP.NET Core, Blazor, and .NET MAUI applications.

It is a non-UI component that provides a full-fledged document instance model to interact with the Markdown document elements programmatically and perform the necessary manipulation. The library is built from scratch in C# and does not require any Markdown editor or third-party tools to be installed on the machine.
It is a non-UI component that provides a full-fledged document instance model to interact with Markdown document elements programmatically and perform the required operations. The library is built from scratch in C# and does not require any Markdown editor or third-party tools to be installed on the machine.

**Key Features**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ documentation: UG

# Working with Images in Markdown Library

Images are essential elements of Markdown documents that enhance visual communication and documentation. The Syncfusion<sup>&reg;</sup> Markdown library facilitates adding, modifying, and managing images in a Markdown document. Images in Markdown are represented by the `MdPicture` class, which is an inline element that can be added to a `MdParagraph`. The library supports both URL-based and byte array-based images, allowing you to reference external image files or embed images directly into the document.
Images are essential elements of Markdown documents that enhance visual communication and documentation. The Syncfusion<sup>&reg;</sup> .NET Markdown library facilitates adding, modifying, and managing images in a Markdown document. Images in Markdown are represented by the `MdPicture` class, which can be added to the inline collection of an `MdParagraph`. The library supports both URL-based and byte array-based images, allowing you to reference external image files or embed images directly into the document. Supported image formats include PNG, JPEG, BMP, GIF, WebP, and SVG.

When saving a Markdown document using the `Save(fileName)` overloads, the library creates a new folder parallel to the output file name and exports all the images into it as default.
When saving a Markdown document using the `Save(fileName)` overloads, the library creates a new folder parallel to the output file name and exports all the images into it by default.

When using the `Save(Stream)` overloads, the library preserves the images as base64 format in the output Markdown file as default.
When using the `Save(Stream)` overloads, the library preserves the images as base64 data URIs in the output Markdown file by default.

If the image contains both a URL and stream values, or contains only a URL, the URL will be used in the output document.

Expand Down Expand Up @@ -68,7 +68,7 @@ markdownDocument.Dispose()

A complete working sample is available on [GitHub](https://github.com/SyncfusionExamples/Markdown-Examples/tree/master/Image/Add-image-from-URL/.NET).

## Adding image from file path
## Adding an image from a file path

The Syncfusion Markdown library supports adding images from file paths. The following code example demonstrates how to add an image from a file path.

Expand Down Expand Up @@ -118,9 +118,9 @@ A complete working sample is available on [GitHub](https://github.com/Syncfusion

## Adding image from image bytes

The Syncfusion Markdown library allows embedding images directly into a Markdown document using byte arrays. This is particularly useful when you need to include images that are dynamically generated, retrieved from a database, or loaded from memory.
The Syncfusion<sup>&reg;</sup> .NET Markdown library allows embedding images directly into a Markdown document using byte arrays. This is useful when you need to include images that are dynamically generated, retrieved from a database, or loaded from memory. When the document is saved with the `Save(fileName)` overload, the bytes are written to the auto-generated images folder; when saved with the `Save(Stream)` overload, the bytes are embedded as a base64 data URI.

The following code example demonstrates how to add an image from a image bytes.
The following code example demonstrates how to add an image from a byte array.

{% tabs %}

Expand Down Expand Up @@ -311,7 +311,7 @@ A complete working sample is available on [GitHub](https://github.com/Syncfusion

Alternative text (alt text) is essential for accessibility, providing textual descriptions of images for screen readers and situations where images cannot be displayed. The Syncfusion Markdown library allows you to set and modify alternative text for images using the `AltText` property.

The following code example demonstrates how to add descriptive alternative text to images.
The following code example demonstrates how to add descriptive alternative text to an image.

{% tabs %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ A complete working sample is available on [GitHub](https://github.com/Syncfusion

## Applying paragraph styles

Paragraph styles define the visual appearance of a paragraph in a Markdown document. The Syncfusion Markdown library supports heading styles (Heading 1 through Heading 6), blockquote style, and the default normal paragraph style. You can apply a style to a paragraph by using the `ApplyParagraphStyle` method of the `MdParagraph` class.
Paragraph styles define the visual appearance of a paragraph in a Markdown document. The Syncfusion<sup>&reg;</sup> .NET Markdown library supports heading styles (Heading 1 through Heading 6), the blockquote style, and the default paragraph style (Normal). You can apply a style to a paragraph by using the `ApplyParagraphStyle` method of the `MdParagraph` class. Omitting the call leaves the paragraph in the default Normal style.

The following are the supported paragraph styles in the Syncfusion Markdown library:

Expand Down Expand Up @@ -504,7 +504,7 @@ A complete working sample is available on [GitHub](https://github.com/Syncfusion

## Working with hyperlinks

Hyperlink is a reference to data that can link to external content like images, files, webpage, and more. In a Markdown document, a hyperlink may target to any one of the following sources:
A hyperlink is a reference to data that can link to external content such as images, files, webpages, and more. In a Markdown document, a hyperlink may target any one of the following sources:

* Webpage: Represents the web content.
* File: Represents the file in some location.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ documentation: UG

# Working with Code Blocks

Code blocks are fundamental elements in technical documentation and Markdown documents used to display programming code, configuration files, command-line instructions, and other preformatted text. The Syncfusion<sup>&reg;</sup> Markdown library enables you to create, modify, and manage code blocks programmatically in a Markdown document. Code blocks are represented by the `MdCodeBlock` class.
Code blocks are fundamental elements in technical documentation and Markdown documents. They are used to display programming code, configuration files, command-line instructions, and other preformatted text. The Syncfusion<sup>&reg;</sup> .NET Markdown library enables you to create, modify, and manage code blocks programmatically in a Markdown document. Code blocks are represented by the `MdCodeBlock` class.

## Types of code blocks

The Syncfusion Markdown library supports two primary types of code blocks:
The Syncfusion<sup>&reg;</sup> .NET Markdown library supports two primary types of code blocks:

* **Fenced code blocks**: Code blocks enclosed with triple backticks (```) or triple tildes (~~~), allowing optional language specification for syntax highlighting.
* **Indented code blocks**: Traditional code blocks created by indenting each line with four spaces or one tab.

N> The `IsFencedCode` property controls the code block type. By default, code blocks are created as fenced code blocks.

## Creating fenced code blocks
## Creating a fenced code block

You can add a code block to a `MarkdownDocument` by using the `AddCodeBlock` method. The following code example demonstrates how to create a fenced code block explicitly.

Expand Down Expand Up @@ -125,9 +125,9 @@ markdownDocument.Dispose()

A complete working sample is available on [GitHub](https://github.com/SyncfusionExamples/Markdown-Examples/tree/master/Code-Blocks/Add-indented-code-block/.NET).

## Modifying existing code blocks
## Modifying an existing code block

Existing code blocks in a parsed Markdown document can be modified by iterating through the blocks and updating the `Lines` collection. The following code example demonstrates how to modify code blocks.
Existing code blocks in a parsed Markdown document can be modified by iterating through the blocks and updating the `Lines` collection. The following code example demonstrates how to modify a code block.

{% tabs %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ documentation: UG

# Working with Lists in Markdown Library

Lists are essential elements in Markdown documents that organize and present information in a hierarchical and structured manner. The Syncfusion<sup>&reg;</sup> Markdown library supports creating, modifying, and managing both numbered (ordered) and bulleted (unordered) lists in a Markdown document. Lists are represented by the `MdListFormat` class, which can be applied to a `MdParagraph`. The library supports up to nine nesting levels (level 0 to level 8), allowing for complex hierarchical structures.
Lists are essential elements in Markdown documents that organize and present information in a hierarchical and structured manner. The Syncfusion<sup>&reg;</sup> .NET Markdown library supports creating, modifying, and managing both numbered (ordered) and bulleted (unordered) lists in a Markdown document. Lists are not separate block types; they are produced by applying an `MdListFormat` instance to an `MdParagraph`. The library supports up to nine nesting levels (level `0` to level `8`), allowing for complex hierarchical structures.

The Syncfusion Markdown library supports two primary types of lists:
The Syncfusion<sup>&reg;</sup> .NET Markdown library supports two primary types of lists:

* **Numbered lists (Ordered lists)**: Lists with sequential numbering such as 1., 2., 3., etc.
* **Bulleted lists (Unordered lists)**: Lists with bullet markers such as -, *, or +.
Expand Down Expand Up @@ -101,7 +101,7 @@ A complete working sample is available on [GitHub](https://github.com/Syncfusion

N> The `ListValue` property specifies the complete list prefix including the marker and spacing. For bulleted lists, typical values are "- ", "* ", or "+ ".

## Creating numbered list
## Creating a numbered list

A numbered list can be created by setting the `ListFormat` property of a paragraph and `IsNumbered` property to true and configuring the appropriate marker.

Expand Down Expand Up @@ -197,7 +197,7 @@ A complete working sample is available on [GitHub](https://github.com/Syncfusion

N> The `ListValue` property contains the actual number and marker for each item.

## Creating multilevel bulleted list
## Creating a multilevel bulleted list

Multilevel bulleted lists can be created by varying the `ListLevel` property. The list level ranges from 0 (root level) to 8 (deepest nested level), supporting up to nine levels of nesting.

Expand Down Expand Up @@ -333,9 +333,9 @@ A complete working sample is available on [GitHub](https://github.com/Syncfusion

N> Each nesting level typically adds spaces of indentation. Level 0 has no indentation.

## Creating multilevel numbered list
## Creating a multilevel numbered list

Multilevel numbered lists can be created by varying the `ListLevel` property. The list level ranges from 0 (root level) to 8 (deepest nested level), supporting up to nine levels of nesting. It combines hierarchical structure with sequential numbering at each level.
Multilevel numbered lists can be created by varying the `ListLevel` property. The list level ranges from `0` (root level) to `8` (deepest nested level), supporting up to nine levels of nesting. A multilevel numbered list combines a hierarchical structure with sequential numbering at each level.

The following code example demonstrates how to create a multilevel numbered list.

Expand Down
Loading