Inserting HTML code #1026
Unanswered
guillemc23
asked this question in
Q&A
Replies: 1 comment
-
Yes, you can read HTML from a file and inject it into your React component. To get this done, you can use Node.js (assuming you're using it for your build) to read the HTML file and then pass the content to your React component. Here's an example:
it worked for me.. |
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.
-
Hey! I am building a template using this tool, but I would like to reuse some old html that we used to send on our emails in the past. Would it be possible to just inject some html file into the email?
Creating a component like this works:
but I would like to read the html to be inserted from a text file instead of a variable. My HTML is ready to be inserted on an email so I wouldn't need to do any kind of transformation to it, just allow it to be injected using a similar approach to this one
Beta Was this translation helpful? Give feedback.
All reactions