Skip to content

Add a plaintext renderer #10

@avigoldman

Description

@avigoldman

Being able to render to the email as a plain text file will great as it will let users write their content in a single place and get it in both of the formats they'll need to send out.

Braindump time

I'm not sure what the best interface for the package/cli is.
I'm leaning towards a flag on the CLI but I can also see it as a separate command. Maybe also an option for the develop command?

My initial thought is having an option of the file type to export to: either txt or eml which might point to more of a standalone command. (See #7)

For the implementation, I'm thinking a default plaintext function that gets added by the createElement that simply returns the content. For elements where that doesn't work, you override it. i.e. the img element returns the alt text and the image url.

Any and all suggestions are welcome! 🙌

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions