@maizzle/framework
Version:
Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.
22 lines (21 loc) • 592 B
JavaScript
import { RenderContextKey } from "./renderContext.js";
import { inject } from "vue";
//#region src/composables/usePlaintext.ts
/**
* Enable plaintext generation for the current email template.
*
* Usage in SFC <script setup>:
* ```ts
* usePlaintext()
* usePlaintext({ extension: 'text' })
* usePlaintext({ destination: '/custom/path' })
* usePlaintext({ options: { ignoreTags: ['br'] } })
* ```
*/
function usePlaintext(options) {
const ctx = inject(RenderContextKey);
if (ctx) ctx.plaintext = options ?? {};
}
//#endregion
export { usePlaintext };
//# sourceMappingURL=usePlaintext.js.map