UtilMarkdownConvertMarkdownToHtml(FileInfo, MarkdownItPreset, MarkdownItOptions, Encoding) Method

Converts the source markdown document file to html string.

This function internally uses markdown-it JavaScript library (https://github.com/markdown-it/markdown-it).

Definition

Namespace: DevCase.Core.DataProcessing.Markdown
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static string ConvertMarkdownToHtml(
	FileInfo mdFile,
	MarkdownItPreset preset = MarkdownItPreset.Default,
	MarkdownItOptions options = null,
	Encoding encoding = null
)

Parameters

mdFile  FileInfo
The source markdown document (md) file.
preset  MarkdownItPreset  (Optional)
Optional preset value to quickly enable/disable active syntax rules and options for common use cases.

Default value: Default

options  MarkdownItOptions  (Optional)
Optional MarkdownItOptions object to configure advanced aspects of the conversion.
encoding  Encoding  (Optional)
Optionally specifies the text encoding used to read the markdown document.

Default value: Default

Return Value

String
The resulting html string.

Remarks

Note: To use this functionality you need to install this nuget package:

Microsoft.ClearScript.V8

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also