I have a JS file, and I would like to place the HTML code from an HTML file within the JS file - is this possible? Currently the HTML code is baked into the JS file in escaped code - e.g. as per example here:
"html": "<div class=\"slideTitleBase\" style=\"background-image:url(slides/_images/Title.jpg); background-size:cover;\"><div class=\"TitleLHS\"><h1>H1 Title</h1><h2>H2 Title</h2></div></div>"
This is messy and not very easy for people to edit - hence why I would like the HTML content to be created in normal HTML and then placed into the JS file so the system can run as required.
Please advise if possible?
e.g. If I have an HTML file called "example.html" - id want to be able to tell this JS file - to pull the raw HTML content from the "example.html" file - so the content of example.html would be:
<div class="slideTitleBase" style="background-image:url(slides/_images/Title.jpg); background-size:cover;"><div class="TitleLHS"><h1>H1 Title</h1><h2>H2 Title</h2></div></div>