-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
43 lines (39 loc) · 1.22 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<button id="designer-btn">Open Designer</button>
<!-- <script
type="module"
id="printcart-design-tool-sdk"
async
data-unauthtoken="1ed23e41e296c45b0c6c9cd722398b90a3cc906301bdebfaac4751cf2df8d06d"
data-productid="962af342-a2c9-4665-bb5d-cb208258d958"
src="/main.js"
></script> -->
<script type="module">
import PrintcartDesigner from "./src/main.ts";
const designer = new PrintcartDesigner({
token:
"1ed23e41e296c45b0c6c9cd722398b90a3cc906301bdebfaac4751cf2df8d06d",
productId: "962af342-a2c9-4665-bb5d-cb208258d958",
options: {
showRuler: true,
showGrid: true,
showBleedLine: true,
showDimensions: true,
},
});
const btn = document.getElementById("designer-btn");
btn.addEventListener("click", () => {
designer.render();
});
designer.on("open", () => console.log("open"));
</script>
</body>
</html>