HtmlForgeX

API Reference

Class

EmailTextBlock

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Base Element
Implements
Modifiers sealed

Rich text block without requiring raw HTML in user code. Supports inline emphasis, muted segments, monospace segments, links and line breaks.

Inheritance

Constructors

public EmailTextBlock() #

Creates an empty text block.

Methods

AddLine 2 overloads
public EmailTextBlock AddLine(Action<EmailTextBlockLine> build) #
Returns: EmailTextBlock

Adds a simple line.

Parameters

text System.String requiredposition: 0
AddLine(System.Action{HtmlForgeX.Email.EmailTextBlockLine} build) #

Adds a line configured via callback.

Parameters

build System.Action{HtmlForgeX.Email.EmailTextBlockLine} required
public override String ToString() #
Returns: String

Properties

public String FontFamily { get; set; } #

Base font family.

public EmailFontSize FontSize { get; set; } #

Base font size.

public String LineHeight { get; set; } #

Base line height (optional). When empty, uses EmailFontSize).

public String Color { get; set; } #

Base text color (theme-aware by default).

public String MutedColor { get; set; } #

Muted text color (theme-aware by default).

public String LinkColor { get; set; } #

Link color (theme-aware by default).

public Alignment Alignment { get; set; } #

Text alignment.

public EmailTextWrapMode WrapMode { get; set; } #

Wrapping behavior (useful for long tokens/URLs).

public List<EmailTextBlockLine> Lines { get; } #

Lines of content.