I am working on my website's Terms And Conditions page. I have the actual document as a .docx
file but using Google Docs I am able to export it as an .html
file.
The generated file is it's own standalone HTML element, with a custom stylesheet that Google loads in. It looks like this (summarised):
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<style type="text/css">
@import url('https://themes.googleusercontent.com/fonts/css?kit=fpjTOVmNbO4Lz34iLyptLUXza5VhXqVC6o75Eld_V98');.lst-kix_list_1-3>li:before{content:"\0025cf "}.lst-kix_l.......
</style>
</head>
<body class="c16">
<!-- a bunch of elements with custom classes -->
</body>
</html>
How can I safely load this document inside my React component, with the included stylesheet?
class TermsAndConditionsPage extends React.Component {
render() {
// my custom React code here
// the HTML doc here...
}
}
I could just paste the contents of the <body>
tag inside, but then I lose the styling. Is it possible to load the stylesheet only when the user lands on this page?