HtmlForgeX

API Reference

Enum

EmailTextWrapMode

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Base Enum
Implements
IComparable ISpanFormattable IFormattable IConvertible
Modifiers sealed

Defines different text wrapping behaviors for email components. Controls how long words and method names break and wrap within containers.

Inheritance

  • Enum
  • EmailTextWrapMode

Values

public const EmailTextWrapMode Default #

Default wrapping - allows breaking anywhere in long words. Uses: word-wrap: break-word; overflow-wrap: break-word; Best for: General text content that needs to fit in containers.

Value: 0
public const EmailTextWrapMode Natural #

Natural wrapping - only breaks at natural word boundaries. Uses: word-break: normal; overflow-wrap: normal; Best for: Code, method names, URLs that should stay intact. Example: "ConfigureImageOptimization" stays on one line if possible.

Value: 1
public const EmailTextWrapMode Aggressive #

Aggressive wrapping - breaks anywhere, even mid-character. Uses: word-break: break-all; overflow-wrap: break-word; Best for: Very narrow columns or when space is extremely limited.

Value: 2
public const EmailTextWrapMode Preserve #

Preserve formatting - maintains exact whitespace and prevents wrapping. Uses: white-space: pre; overflow-wrap: normal; Best for: Code blocks, preformatted text, exact spacing requirements.

Value: 3
public const EmailTextWrapMode Hyphenated #

Hyphenated wrapping - breaks with hyphens where possible. Uses: word-wrap: break-word; hyphens: auto; Best for: Professional documents, long words that benefit from hyphenation. Note: Hyphenation support varies by email client.

Value: 4
public const EmailTextWrapMode Smart #

Smart wrapping - tries to keep method names and camelCase intact. Uses: word-break: keep-all; overflow-wrap: break-word; Best for: Technical documentation, API references, code examples.

Value: 5

Extension Methods

public static String GetDescription(EmailTextWrapMode wrapMode) #
Returns: String

Gets a description of what the wrap mode does.

Parameters

wrapMode HtmlForgeX.Email.EmailTextWrapMode requiredposition: 0
The wrap mode to describe.

Returns

A human-readable description of the wrap mode behavior.

public static String GetExamples(EmailTextWrapMode wrapMode) #
Returns: String

Gets example use cases for the wrap mode.

Parameters

wrapMode HtmlForgeX.Email.EmailTextWrapMode requiredposition: 0
The wrap mode to get examples for.

Returns

Example use cases as a string.

public static String ToCssProperties(EmailTextWrapMode wrapMode) #
Returns: String

Converts the EmailTextWrapMode to CSS properties for text wrapping.

Parameters

wrapMode HtmlForgeX.Email.EmailTextWrapMode requiredposition: 0
The wrap mode to convert.

Returns

CSS properties as a string for the specified wrap mode.