Method Create
- Namespace
- TinyComponents
- Assembly
- TinyComponents.dll
Create(string)
Creates an HtmlElement from the specified emmet template.
public static HtmlElement Create(string emmetString)
Parameters
emmetString
string
Returns
Create(string, object?, object?, object?[]?, bool)
Creates an HtmlElement from the specified emmet template and adds the specified style, attributes, and children.
public static HtmlElement Create(string emmetString, object? style = null, object? attributes = null, object?[]? children = null, bool selfClosing = false)
Parameters
emmetString
stringThe emmet template string.
style
objectAn object containing style properties to apply to the element. Can be null.
attributes
objectAn object containing attribute names and values to apply to the element. Can be null.
children
object[]An array of objects to put as children of the creating element. Can be null.
selfClosing
boolAn boolean indicating if the creating element should be self-closed or not.
Returns
- HtmlElement
A new HtmlElement based on the emmet template with the specified style, attributes, and children.
Create(string, Action<HtmlElement>)
Creates an HtmlElement from the specified emmet template and configures it using the specified action.
public static HtmlElement Create(string emmetString, Action<HtmlElement> self)
Parameters
emmetString
stringThe emmet template string.
self
Action<HtmlElement>An action to configure the created HtmlElement.
Returns
- HtmlElement
A new HtmlElement based on the emmet template and configured using the specified action.