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.MarkdownElementInheritance: object → MarkdownElement → MarkdownContentElement
Derived:
Remarks
Section titled “Remarks”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.
Constructors
Section titled “Constructors”MarkdownContentElement()
Section titled “MarkdownContentElement()”protected MarkdownContentElement()Properties
Section titled “Properties”Content
Section titled “Content”Gets the child elements.
public IList<MarkdownElement> Content { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”AddCode(string)
Section titled “AddCode(string)”Adds a code block without a language and returns it.
public MarkdownCode AddCode(string code)Parameters
Section titled “Parameters”codestring
Returns
Section titled “Returns”AddCode(string, string)
Section titled “AddCode(string, string)”Adds a code block written in language and returns it.
public MarkdownCode AddCode(string language, string code)Parameters
Section titled “Parameters”Returns
Section titled “Returns”AddCore<T>(T)
Section titled “AddCore<T>(T)”Adds element to Content and returns it.
protected internal T AddCore(T element)Parameters
Section titled “Parameters”elementT
Returns
Section titled “Returns”T
AddHeader(int, MarkdownText)
Section titled “AddHeader(int, MarkdownText)”Adds a header with an explicit level and returns it.
public MarkdownHeader AddHeader(int level, MarkdownText text)Parameters
Section titled “Parameters”levelinttextMarkdownText
Returns
Section titled “Returns”Remarks
Section titled “Remarks”Use AddSection(MarkdownText) for a level that follows the nesting.
AddHtml(string)
Section titled “AddHtml(string)”Adds a block of raw HTML and returns it.
public MarkdownHtml AddHtml(string html)Parameters
Section titled “Parameters”htmlstring
Returns
Section titled “Returns”Remarks
Section titled “Remarks”The markup reaches the output unchanged, so it must not be built from untrusted text.
AddList(bool)
Section titled “AddList(bool)”Adds an empty list and returns it, numbering the items when isOrdered is true.
public MarkdownList AddList(bool isOrdered)Parameters
Section titled “Parameters”isOrderedbool
Returns
Section titled “Returns”AddParagraph(MarkdownText)
Section titled “AddParagraph(MarkdownText)”Adds a paragraph and returns it.
public MarkdownParagraph AddParagraph(MarkdownText text)Parameters
Section titled “Parameters”textMarkdownText
Returns
Section titled “Returns”AddQuote()
Section titled “AddQuote()”Adds a quote that holds only block elements and returns it.
public MarkdownQuote AddQuote()Returns
Section titled “Returns”AddQuote(MarkdownText)
Section titled “AddQuote(MarkdownText)”Adds a quote that starts with quote and returns it.
public MarkdownQuote AddQuote(MarkdownText quote)Parameters
Section titled “Parameters”quoteMarkdownText
Returns
Section titled “Returns”AddSection(MarkdownText)
Section titled “AddSection(MarkdownText)”Adds a section one level below this one and returns it.
public MarkdownSection AddSection(MarkdownText text)Parameters
Section titled “Parameters”textMarkdownText
Returns
Section titled “Returns”AddSection(int, MarkdownText)
Section titled “AddSection(int, MarkdownText)”Adds a section whose header carries an explicit level and returns it.
public MarkdownSection AddSection(int level, MarkdownText text)Parameters
Section titled “Parameters”levelinttextMarkdownText
Returns
Section titled “Returns”Remarks
Section titled “Remarks”The level does not follow the nesting, so it may also be shallower than this one.
AddTable()
Section titled “AddTable()”Adds an empty table and returns it.
public MarkdownTable AddTable()Returns
Section titled “Returns”AddThematicBreak()
Section titled “AddThematicBreak()”Adds a thematic break and returns it.
public MarkdownThematicBreak AddThematicBreak()Returns
Section titled “Returns”Resolve(MarkdownRenderer)
Section titled “Resolve(MarkdownRenderer)”Writes the element into renderer.
protected internal virtual void Resolve(MarkdownRenderer renderer)Parameters
Section titled “Parameters”rendererMarkdownRenderer