HtmlForgeX

API Reference

Interface

ITextElement`1

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Modifiers abstract

Interface for elements that display text content. Provides properties and methods for text styling.

Type Parameters

T
The concrete type implementing this interface.

Methods

public abstract T WithAlignment(Alignment alignment) #
Returns: T

Sets the text alignment.

Parameters

alignment HtmlForgeX.Email.Alignment requiredposition: 0
The alignment option.

Returns

The element instance for method chaining.

WithColor 2 overloads
public abstract T WithColor(RGBColor color) #
Returns: T

Sets the text color.

Parameters

color System.String requiredposition: 0
The text color.

Returns

The element instance for method chaining.

WithColor(HtmlForgeX.Email.RGBColor color) #

Sets the text color using RGBColor.

Parameters

color HtmlForgeX.Email.RGBColor required
The text color.

Returns

The element instance for method chaining.

public abstract T WithFontFamily(String fontFamily) #
Returns: T

Sets the font family.

Parameters

fontFamily System.String requiredposition: 0
The font family.

Returns

The element instance for method chaining.

WithFontSize 2 overloads
public abstract T WithFontSize(EmailFontSize fontSize) #
Returns: T

Sets the font size.

Parameters

fontSize System.String requiredposition: 0
The font size.

Returns

The element instance for method chaining.

WithFontSize(HtmlForgeX.Email.EmailFontSize fontSize) #

Sets the font size using predefined values.

Parameters

fontSize HtmlForgeX.Email.EmailFontSize required
The predefined font size.

Returns

The element instance for method chaining.

WithFontWeight 2 overloads
public abstract T WithFontWeight(FontWeight fontWeight) #
Returns: T

Sets the font weight.

Parameters

fontWeight System.String requiredposition: 0
The font weight.

Returns

The element instance for method chaining.

WithFontWeight(HtmlForgeX.Email.FontWeight fontWeight) #

Sets the font weight using predefined values.

Parameters

fontWeight HtmlForgeX.Email.FontWeight required
The predefined font weight.

Returns

The element instance for method chaining.

public abstract T WithLineHeight(String lineHeight) #
Returns: T

Sets the line height.

Parameters

lineHeight System.String requiredposition: 0
The line height.

Returns

The element instance for method chaining.

WithTextDecoration 2 overloads
public abstract T WithTextDecoration(TextDecoration decoration) #
Returns: T

Sets the text decoration.

Parameters

textDecoration System.String requiredposition: 0
The text decoration.

Returns

The element instance for method chaining.

WithTextDecoration(HtmlForgeX.Email.TextDecoration decoration) #

Sets the text decoration using predefined options.

Parameters

decoration HtmlForgeX.Email.TextDecoration required
The decoration option.

Returns

The element instance for method chaining.

Properties

public abstract String FontFamily { get; set; } #

Gets or sets the font family for the text.

public abstract String FontSize { get; set; } #

Gets or sets the font size for the text.

public abstract String Color { get; set; } #

Gets or sets the text color.

public abstract String LineHeight { get; set; } #

Gets or sets the line height for the text.

public abstract String TextAlign { get; set; } #

Gets or sets the text alignment.

public abstract String FontWeight { get; set; } #

Gets or sets the font weight.

public abstract String TextDecoration { get; set; } #

Gets or sets the text decoration.