Plaintext
Two complementary components that route slot content to a single output. Whatever you wrap stays in the matching output and is removed from the other.
| Component | Appears in .html | Appears in .txt |
|---|---|---|
<Plaintext> | × | ✓ |
<NotPlaintext> | ✓ | × |
Usage
emails/example.vue
<template>
<Layout>
<Container>
<Text>This shows in both outputs.</Text>
<Plaintext>
Only shows in the plaintext version.
</Plaintext>
<NotPlaintext>
Only shows in the HTML version.
</NotPlaintext>
</Container>
</Layout>
</template>
Plaintext output
To actually generate a .txt file alongside each compiled email, enable plaintext:
maizzle.config.ts
import { defineConfig } from '@maizzle/framework'
export default defineConfig({
plaintext: true,
})