MarkdownWidget

Ecng.Markdown

A control the host puts in the place where the text says @widget(name key=value ...) (see WidgetExtension). The markdown renders it as an empty marker element; the host cuts the rendered HTML at the markers with String) and draws each widget itself.

Construtores

MarkdownWidget
public MarkdownWidget(string name, IReadOnlyDictionary<string, string> arguments)
markdownWidget = MarkdownWidget(name, arguments)

Initializes a new instance of the MarkdownWidget.

name
The widget name: lower-case letters and digits, words joined by single hyphens.
arguments
The arguments by key; a key is lower-case, starts with a letter and may hold digits and hyphens.

Propriedades

Arguments
public IReadOnlyDictionary<string, string> Arguments { get; }
value = markdownWidget.Arguments

The arguments written in the line, by key.

Name
public string Name { get; }
value = markdownWidget.Name

The widget name.

Métodos

Split
public static IReadOnlyList<MarkdownWidgetPart> Split(string html)
result = MarkdownWidget.Split(html)

Cuts rendered HTML at its widget markers.

html
The rendered HTML.

Retorna: The markup and widget parts in document order; markup that is only white space is left out.

ToHtml
public string ToHtml()
result = markdownWidget.ToHtml()

The marker element that stands for the widget in the rendered HTML.

Retorna: The marker markup.