Skip to content
Auto
Products

MarkdownHeader

Namespace: TagBites.Text.Markdown
Assembly: TagBites.Text.Markdown.dll
Product: TagBites.Text.Markdown v. 2.2.0

A header, written with the # marker.

public class MarkdownHeader : TagBites.Text.Markdown.MarkdownElement, TagBites.Text.Markdown.IMarkdownLinkTarget

Inheritance: objectMarkdownElement → MarkdownHeader

Markdown has no header below level six. A deeper one becomes bold text followed by a hard line break, which reads as a header in every renderer.

Creates a header whose level follows the section nesting.

public MarkdownHeader(MarkdownText text)

Creates a header with an explicit level, between one and six.

public MarkdownHeader(int level, MarkdownText text)

Gets the identifier the header is linked to, or null when the text carries no letter or digit.

public virtual string AnchorId { get; }

string

Falls back to the text in lower case with white space turned into a hyphen, which is what a renderer derives.

Gets or sets the explicit anchor of the header.

public string CustomId { get; set; }

string

MarkdownFormat.HeaderAnchorStyle decides how the anchor is written. The property drops a leading #.

Gets or sets the level of the header, or null when it follows the section nesting.

public int? Level { get; set; }

int?

Gets or sets the text of the header.

public virtual MarkdownText Text { get; set; }

MarkdownText

Writes the element into renderer.

protected internal virtual void Resolve(MarkdownRenderer renderer)

Gets or sets the explicit anchor of the header.

public MarkdownHeader SetCustomId(string customId)

MarkdownHeader

MarkdownFormat.HeaderAnchorStyle decides how the anchor is written. The property drops a leading #.