I needed to load external file to my app. type of json. I am needed to read html content like this(the html will be the value):
<div style="font-size:16px; color:red; text-align:center; display:flex">
<h1 style="some-style">some text</h1>
<p style="some-style">some text</p>
<p style="some-style">some text</p>
<p style="some-style">some text</p>
<footer style="some-style">some copyrights!</footer>
</div>
from json like this:
{
"email": {
"subject": "User registered!",
"html": {here goes the html block}
}
}
Every-time I am writing html in json is very difficult to writing because the double quotes. How can if fix it and can writing a right html? There is any generator for this or any solution?
I needed to html for the module nodemailer to send email. I want to read from json because the main idea it's to send for my clients the json file and they can to add any changes with the value and adding the json from outside after that ,as a volume via docker build.