HtmlForgeX

API Reference

Class

BasicElement

Namespace HtmlForgeX
Assembly HtmlForgeX
Base Element

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

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 BasicElement SetText(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.

public override String ToString() #
Returns: String

Converts the BasicElement to its string representation.

Returns

HTML string representing the element.

Properties

public String TextContent { get; set; } #

Gets or sets the text content of this element.

public String HtmlContent { get; set; } #

Gets or sets the HTML content of this element.