Text Block
The Text Block is a block that allows you to display text content in your email. It supports several options to help you customize the appearance of your text.
Options
- color (string): The color of the text.
- font (IFont): The font of the text.
- lineHeight (ILineHeight): The line height of the text.
- padding (IPadding): The padding around the text.
Usage
To use the Text Block in your email, you can create a new instance of the TextBlock
class and customize its options.
Here’s an example:
In this example, we’ve customized the color, font, line height, and padding of the Text Block, and provided some text content to display.
{% hint style=“info” %}
Note: The toObject()
method is called on the instance of TextBlock
to convert the block into an object that can
be used in an email template.
{% endhint %}