Replies: 2 comments
-
That would be interesting, but I wonder what other use cases this could allow for? I'm working on a custom renderer for React Email that should allow for you to add inline comments without {'<!--'}
Content
{'-->'} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Looking forward to the custom renderer if that’s going solve the MSO conditional comments issue 👍
There could be other interesting use cases for the post-render transformation steps… Maizzle has a number of transformations which all look useful https://maizzle.com/docs/build-process.
I think having a way for users to be able to hook in to this part of the rendering pipeline would be beneficial as it would allow users to implement any transformations they want without having to build them in to the core of React.email.
…On 8 May 2024 at 14:07 +0100, Gabriel Miranda ***@***.***>, wrote:
That would be interesting, but I wonder what other use cases this could allow for?
I'm working on a custom renderer for React Email that should allow for you to add inline comments without innerHtml and without transformations on the end HTML, so it should just work when you use templating, like:
{'<!--'}
Content
{'-->'}
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Allow users to be able to run post-processing on output of
render
.Background
The underlying need for this for me has come from the fact that there is currently no good way to allow users to render MSO conditional comments (see #1389).
As part of that discussion a workaround was suggested which can be used to solve the problem, however it requires being in control of the call to React.emails
render
method.This requirement is not an issue for users integrating with
render
directly but when using theemails export
command this becomes a problem because (as far as I can see) there is currently no way to grab the resulting rendered HTML string which means I can't run any of my own post-processing on it.Proposal
I thought that perhaps some way to define an array of post-render transformation functions that get run at the end of
render
could be added to React.email which could provide a more general way for users to workaround this specific issue, but potentially also other issues where JSX syntax limits how things can be done.I'm happy to explore contributing a PR if the maintainers think this is a direction that makes sense for the project? If so have you any guidance or ideas on how you might like to see this implemented?
Beta Was this translation helpful? Give feedback.
All reactions