Skip to main content

Plain text

How the plain-text fallback is produced from the rendered HTML, what it excludes, and how to control table output.

Every render returns a text string alongside html. By default it is a deterministic fallback produced from the final rendered HTML. Nuxt Email uses a fixed html-to-text version with no line wrapping.

When automatic conversion is not good enough, the template can declare authored text with defineEmail({ text: '…' }) or a synchronous text function. Authored text replaces derivation for that render; it does not create a second template or rendering path.

What plain text includes and excludes

  • Excluded: head content, images, <script>/<style> content, and any element marked data-skip-in-text="true". EPreview is therefore absent from the fallback.
  • Links: destinations are retained when the visible text differs from the URL. Fragment links and mailto: links follow the recorded React Email comparison behavior.
  • Structure: nested lists, ordered-list starts, blockquotes, hard breaks, preformatted content, Unicode, and ordinary tables all have exact conformance cases.

Controlling table output

By default tables render as plain rows. When you specifically need aligned, column-formatted output for a table, add data-text-format="dataTable" to that table:

vue
<table data-text-format="dataTable">
  <!-- rows -->
</table>

Inspect it every time

Plain text is a real deliverable that some recipients and spam filters read. Inspect it in the development preview's Plain text tab for every transactional template, exactly as you would review the HTML.

ECodeInline appears once
ECodeInline keeps two copies in HTML for Orange.fr compatibility, but marks the hidden copy to be skipped by plain-text generation. Recipients therefore receive the code once in the text alternative. This is an intentional divergence from React Email.