Skip to content
Auto
Products

MarkdownContentElement

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

An element that holds other elements.

public abstract class MarkdownContentElement : TagBites.Text.Markdown.MarkdownElement

Inheritance: objectMarkdownElement → MarkdownContentElement

Derived:

An Add method returns the element it created, which moves the chain one level deeper. A With method of MarkdownElementExtensions returns the receiver and keeps the chain at the same level.

protected MarkdownContentElement()

Gets the child elements.

public IList<MarkdownElement> Content { get; }

IList<MarkdownElement>

Adds a code block without a language and returns it.

public MarkdownCode AddCode(string code)

MarkdownCode

Adds a code block written in language and returns it.

public MarkdownCode AddCode(string language, string code)

MarkdownCode

Adds element to Content and returns it.

protected internal T AddCore(T element)
  • element T

T

Adds a header with an explicit level and returns it.

public MarkdownHeader AddHeader(int level, MarkdownText text)

MarkdownHeader

Use AddSection(MarkdownText) for a level that follows the nesting.

Adds a block of raw HTML and returns it.

public MarkdownHtml AddHtml(string html)

MarkdownHtml

The markup reaches the output unchanged, so it must not be built from untrusted text.

Adds an empty list and returns it, numbering the items when isOrdered is true.

public MarkdownList AddList(bool isOrdered)

MarkdownList

Adds a paragraph and returns it.

public MarkdownParagraph AddParagraph(MarkdownText text)

MarkdownParagraph

Adds a quote that holds only block elements and returns it.

public MarkdownQuote AddQuote()

MarkdownQuote

Adds a quote that starts with quote and returns it.

public MarkdownQuote AddQuote(MarkdownText quote)

MarkdownQuote

Adds a section one level below this one and returns it.

public MarkdownSection AddSection(MarkdownText text)

MarkdownSection

Adds a section whose header carries an explicit level and returns it.

public MarkdownSection AddSection(int level, MarkdownText text)

MarkdownSection

The level does not follow the nesting, so it may also be shallower than this one.

Adds an empty table and returns it.

public MarkdownTable AddTable()

MarkdownTable

Adds a thematic break and returns it.

public MarkdownThematicBreak AddThematicBreak()

MarkdownThematicBreak

Writes the element into renderer.

protected internal virtual void Resolve(MarkdownRenderer renderer)