How to output raw HTML with SSR Start?

I get a raw html string back from an API and want to just plop the contents before the closing <body> tag. I can do <span innerHTML={apiresponse}/> and it does output the proper HTML, but the HTML contains <script> tags, and needs to be attached to the body. I can't have the span/div/whatever in there. And doing
<Show when={(routeDataResponse() as ApiResponse)}>{response=>response}</Show>
<Show when={(routeDataResponse() as ApiResponse)}>{response=>response}</Show>
just renders it as a string.
2 Replies
Birk Skyum
Birk Skyum3mo ago
Hmm, I wonder if it's reasonable here to run effectively another nested solid app with by attaching it to an existing element. Or if you can split out the script tags, it should be possible to add them at runtime with the solidjs/meta.
Some Call Me Tim
oh geez, so there's not just a simple function/component which can output a raw string value? I was hoping I'd just missed something obvious. The HTML I get back from the API is user generated, i.e. it can be literally anything they type in there. Think a wysywig editor where you can input your own custom code. In the current Node app I'm porting, clients already have their code structured so it appears just by the </body>, if I all of a sudden nest it in another element, it might/probably will break what they've set up. it's just a simple string concatenation in node 🫤