Skip to content

Rule.io SDK


Rule.io SDK / rcml/src / createPlainTextElement

Function: createPlainTextElement()

createPlainTextElement(options): RcmlPlainText

Defined in: rcml/src/email/create-rcml-element.ts:1115

Build an <rc-plain-text> — the plain-text alternative body that mail clients render when they can't (or won't) display HTML. Sits inside <rc-head>.

Parameters

options

PlainTextElementOptions

options.content is the plain-text body string.

Returns

RcmlPlainText

A typed RcmlPlainText node.

Example

ts
createPlainTextElement({ content: 'Hi — see the full offer at example.com/sale.' })