HtmlForgeX

API Reference

Class

BasicElement

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Base Element
Implements

A concrete implementation of Element for basic content containers such as paragraphs or generic block containers.

Inheritance

Constructors

BasicElement 2 overloads
public BasicElement() #

Initializes a new instance of the BasicElement class.

public BasicElement(String text) #

Initializes a new instance of the BasicElement class with text content.

Parameters

text System.String requiredposition: 0
The text content.

Methods

public BasicElement SetHtml(String html) #
Returns: BasicElement
EditorBrowsable(1)

Sets the HTML content of this element.

Parameters

html System.String requiredposition: 0
The HTML content.

Returns

The BasicElement object, allowing for method chaining.

public override String ToString() #
Returns: String

Converts the BasicElement to its string representation.

Returns

HTML string representing the element.

public BasicElement WithText(String text) #
Returns: BasicElement

Sets the text content of this element.

Parameters

text System.String requiredposition: 0
The text content.

Returns

The BasicElement object, allowing for method chaining.

Properties

public String TextContent { get; set; } #

Gets or sets the text content of this element.

public String HtmlContent { get; set; } #
EditorBrowsable(1)

Gets or sets the HTML content of this element.