HtmlToMarkdownOptions Class

Options that control how HTML is converted to Markdown.

public sealed class HtmlToMarkdownOptions

Constructors

NameDescription
HtmlToMarkdownOptions()

HtmlToMarkdownOptions()

HtmlToMarkdownOptions.cs
public HtmlToMarkdownOptions()

No documentation is available.

Properties

NameDescription
CodeBlockFenceCharacterGets or sets the fence character used for fenced code blocks.
CodeBlockStyleGets or sets the style used for code blocks.
ComplexTableHandlingGets or sets how the tables that a pipe table cannot represent are converted.
EmbeddedContentStyleGets or sets how video, audio and iframe elements are converted.
EmojiShortcodeModeGets or sets how emoji are converted to shortcodes.
EmphasisMarkerGets or sets the marker used for emphasis.
HeadingStyleGets or sets the heading style to use in Markdown output.
KeyboardStyleGets or sets how keyboard input (kbd) elements are converted.
LineBreakStyleGets or sets the style used for line breaks.
SubscriptStyleGets or sets how subscript (sub) elements are converted.
SuperscriptStyleGets or sets how superscript (sup) elements are converted.
TableSpanHandlingGets or sets how the colspan and rowspan attributes of table cells are handled.
ThematicBreakGets or sets the thematic break text to emit for horizontal rules.
UnderlineStyleGets or sets how underline (u) elements are converted.
UnknownElementHandlingGets or sets how unknown HTML elements are handled.
UnorderedListMarkerGets or sets the marker used for unordered lists.
UseCssWhiteSpaceGets or sets a value indicating whether the white-space and white-space-collapse declarations of the style attributes are honored. When true, the spaces and the line breaks that the style preserves are written as   and as hard line breaks.
UseSimplePunctuationGets or sets a value indicating whether smart punctuation characters are converted to simple ASCII punctuation.

CodeBlockFenceCharacter

HtmlToMarkdownOptions.cs

Gets or sets the fence character used for fenced code blocks.

public char CodeBlockFenceCharacter { get; set; }

Property value

char

Exceptions

ArgumentOutOfRangeException
The value is neither a backtick nor a tilde.

Gets or sets the style used for code blocks.

public CodeBlockStyle CodeBlockStyle { get; set; }

Property value

CodeBlockStyle

ComplexTableHandling

HtmlToMarkdownOptions.cs

Gets or sets how the tables that a pipe table cannot represent are converted.

public ComplexTableHandling ComplexTableHandling { get; set; }

Property value

ComplexTableHandling

EmbeddedContentStyle

HtmlToMarkdownOptions.cs

Gets or sets how video, audio and iframe elements are converted.

public EmbeddedContentStyle EmbeddedContentStyle { get; set; }

Property value

EmbeddedContentStyle

EmojiShortcodeMode

HtmlToMarkdownOptions.cs

Gets or sets how emoji are converted to shortcodes.

public EmojiShortcodeMode EmojiShortcodeMode { get; set; }

Property value

EmojiShortcodeMode

Gets or sets the marker used for emphasis.

public EmphasisMarker EmphasisMarker { get; set; }

Property value

EmphasisMarker

Gets or sets the heading style to use in Markdown output.

public HeadingStyle HeadingStyle { get; set; }

Property value

HeadingStyle

Gets or sets how keyboard input (kbd) elements are converted.

public KeyboardStyle KeyboardStyle { get; set; }

Property value

KeyboardStyle

Gets or sets the style used for line breaks.

public LineBreakStyle LineBreakStyle { get; set; }

Property value

LineBreakStyle

Gets or sets how subscript (sub) elements are converted.

public SubscriptStyle SubscriptStyle { get; set; }

Property value

SubscriptStyle

SuperscriptStyle

HtmlToMarkdownOptions.cs

Gets or sets how superscript (sup) elements are converted.

public SuperscriptStyle SuperscriptStyle { get; set; }

Property value

SuperscriptStyle

TableSpanHandling

HtmlToMarkdownOptions.cs

Gets or sets how the colspan and rowspan attributes of table cells are handled.

public TableSpanHandling TableSpanHandling { get; set; }

Property value

TableSpanHandling

Gets or sets the thematic break text to emit for horizontal rules.

public string ThematicBreak { get; set; }

Property value

string

Gets or sets how underline (u) elements are converted.

public UnderlineStyle UnderlineStyle { get; set; }

Property value

UnderlineStyle

UnknownElementHandling

HtmlToMarkdownOptions.cs

Gets or sets how unknown HTML elements are handled.

public UnknownElementHandling UnknownElementHandling { get; set; }

UnorderedListMarker

HtmlToMarkdownOptions.cs

Gets or sets the marker used for unordered lists.

public char UnorderedListMarker { get; set; }

Property value

char

Exceptions

ArgumentOutOfRangeException
The value is not '-', '*' or '+'.

UseCssWhiteSpace

HtmlToMarkdownOptions.cs

Gets or sets a value indicating whether the white-space and white-space-collapse declarations of the style attributes are honored. When true, the spaces and the line breaks that the style preserves are written as   and as hard line breaks.

public bool UseCssWhiteSpace { get; set; }

Property value

bool

UseSimplePunctuation

HtmlToMarkdownOptions.cs

Gets or sets a value indicating whether smart punctuation characters are converted to simple ASCII punctuation.

public bool UseSimplePunctuation { get; set; }

Property value

bool