Provided you have MS Edge installed, here’s an example that works fine with the Preview HTML plugin:
[image: 1789063091044-preview-html-wireloom.png]
<!DOCTYPE html>
<html>
<head>
<title>wireloom demo</title>
</head>
<body>
<div id="container"></div>
<script type="module">
import wireloom from 'https://cdn.jsdelivr.net/npm/wireloom@0.7.0/+esm';
wireloom.initialize({ theme: 'default' });
// Render a source string to an SVG string.
const { svg } = await wireloom.render('my-diagram',`
window "Sign in":
header:
text "Welcome"
panel:
input placeholder="Email"
input placeholder="Password" type=password
button "Sign in" primary
`);
document.getElementById('container').innerHTML = svg;
</script>
</body>
</html>