ClassMarkdownImportSettings
Controls how Markdown content is imported into a RadFlowDocument.
Definition
Namespace:Telerik.Windows.Documents.Flow.FormatProviders.Md
Assembly:Telerik.Windows.Documents.Flow.dll
Syntax:
public class MarkdownImportSettings
Inheritance: objectMarkdownImportSettings
Constructors
MarkdownImportSettings()
Declaration
public MarkdownImportSettings()
Properties
AllowLocalFileSystemImages
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).
Declaration
public bool AllowLocalFileSystemImages { get; set; }
Property Value
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).
Encoding
Gets or sets the encoding used when reading the Markdown stream. Defaults to UTF-8.
Declaration
public Encoding Encoding { get; set; }
Property Value
Exceptions
Thrown when set to null.
MaxDataUriImageTotalBytes
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.
Declaration
public long MaxDataUriImageTotalBytes { get; set; }
Property Value
MaxDocumentSizeBytes
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.
StyleSettings
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.
Declaration
public MarkdownImportStyleSettings StyleSettings { get; }
Property Value
Warnings
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.