-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathindex.html
87 lines (85 loc) · 2.38 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" />
<link rel="icon" type="image/png" sizes="32x32" href="/src/favicon/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/src/favicon/favicon-16x16.png" />
<meta name="viewport" content="width=900" />
<meta name="description" content="EmailBuilder.js interactive playground. Brought to you by Waypoint." />
<title>EmailBuilder.js — Free and Open Source Template Builder</title>
<style>
html {
margin: 0px;
height: 100vh;
width: 100%;
}
body {
min-height: 100vh;
width: 100%;
}
#root {
/* height: 100vh; */
width: 800px;
position: relative;
}
.root-wrapper {
padding: 100px;
background-color: black;
}
</style>
</head>
<body>
<div class="root-wrapper">
<div id="root" class="email-builder-container"></div>
</div>
<script type="module">
const testData = {
"root": {
"type": "EmailLayout",
"data": {
"backdropColor": "#F5F5F5",
"canvasColor": "#FFFFFF",
"textColor": "#262626",
"fontFamily": "MODERN_SANS",
"childrenIds": [
"block-1727858083795"
]
}
},
"block-1727858083795": {
"type": "Text",
"data": {
"style": {
"fontWeight": "normal",
"padding": {
"top": 16,
"bottom": 16,
"right": 24,
"left": 24
}
},
"props": {
"markdown": false,
"text": "Test template"
}
}
}
}
import('/src/main.tsx')
.then(module => {
module.render('root', { data: testData, onChange: (json, html) => {
console.log("onChange", json, html)
}});
})
.catch(error => {
console.error('Error loading the module:', error);
});
</script>
<!-- Prod build -->
<!-- <script src="dist/listmonk-email-builder.umd.js"></script>
<script>
EmailBuilder.render("root");
</script> -->
</body>
</html>