https://no-gravity.github.io/html_editor/
This has the benefit that you can also edit the html afterwards.
It also has the function to render the HTML into an image (Via the "Render" button). I wonder if one could feed that image back to ChatGPT to provide visual feedback on what it coded? Maybe it would reply with "Oh, now that I see it, let's make the margins on the header a bit smaller and the background a bit more colorful" :)
Much like the Slack issue of smuggling chat secrets out via query parameters.
Has that been considered at all here, or is it on the user to vet the models suggestions?
javascript:navigator.clipboard.readText().then(t => open().document.write(t))
also, when writing a bookmarklet, you can add /* block comments */ and still copy/paste or drag/drop, eg: javascript:/* show the sum */alert(2+2)
but // comments don't work javascript://this won't work;alert(2+2)
<style>
body {
padding: 50px;
}
span {
display: inline-block;
background: #a0ffa0;
padding: 20px;
}
</style>
<span>
Edit the page on top, see
the result on the bottom.
</span>
</body>
</html>Check your mistakes
Rendering SVG can be done exactly the same way, using "data:image/svg+xml," as the prefix. For example: