New to Telerik Document ProcessingStart a free 30-day trial

Controls how Markdown content is imported into a RadFlowDocument.

Definition

Namespace:Telerik.Windows.Documents.Flow.FormatProviders.Md

Assembly:Telerik.Windows.Documents.Flow.dll

Syntax:

C#
public class MarkdownImportSettings

Inheritance: objectMarkdownImportSettings

Constructors

C#
public MarkdownImportSettings()

Properties

Gets or sets whether images referenced by file:// URLs are read from the local file system and embedded during import. Default is false (local file images are skipped and a warning is added).

C#
public bool AllowLocalFileSystemImages { get; set; }
Remarks:

Only enable this when the source Markdown is trusted. Enabling this setting on a server that processes user-supplied documents would allow arbitrary local files to be read and embedded into the output document (CWE-22 Path Traversal / local file disclosure).

Gets or sets the encoding used when reading the Markdown stream. Defaults to UTF-8.

C#
public Encoding Encoding { get; set; }
Exceptions:

ArgumentNullException

Thrown when set to null.

Gets or sets the maximum cumulative number of decoded bytes that may be embedded from data URI images across the entire document. When the running total exceeds this limit, subsequent data URI images are skipped and a warning is added to Warnings. Default is 0 (no limit). Set to a positive value to guard against CWE-400 (Uncontrolled Resource Consumption) via large embedded image payloads.

C#
public long MaxDataUriImageTotalBytes { get; set; }

Gets or sets the maximum number of bytes that may be read from the input stream. Documents that exceed this limit cause an InvalidOperationException to be thrown during import. Default is 52,428,800 (50 MB). Set to 0 to disable the check.

C#
public long MaxDocumentSizeBytes { get; set; }

Gets the style customization settings applied during import. Use this to override which styles are used for Markdown elements or to customize the visual properties of auto-created styles.

C#
public MarkdownImportStyleSettings StyleSettings { get; }

Gets the list of non-fatal warnings generated during the last import operation. This list is cleared and repopulated each time MarkdownFormatProvider imports a document. Typical entries describe images that could not be loaded.

C#
public IList<string> Warnings { get; }
Remarks:

Do not modify this list while an import is in progress.