-
Notifications
You must be signed in to change notification settings - Fork 58
/
index.html
74 lines (68 loc) · 2.07 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GrapesJS Plugin Forms</title>
<link rel="stylesheet" href="https://unpkg.com/grapesjs/dist/css/grapes.min.css">
<script src="https://unpkg.com/grapesjs"></script>
<style>
body, html{ height: 100%; margin: 0;}
.gjs-block-svg {
width: 61%;
}
.gjs-block-svg-path {
fill: white;
}
</style>
</head>
<body>
<div id="gjs" style="height:0px; overflow:hidden">
<form action="index.html" method="post" style="padding: 50px;">
<input type="hidden" name="hidden-input" value="someval">
<div class="row">
<label>Name</label>
<input type="text" name="text-input" value="">
</div>
<div class="row">
<label>Messagge</label>
<textarea name="textarea-input"></textarea>
</div>
<div class="row">
<label>Options</label>
<select name="select-input">
<option value="">- Select -</option>
<option value="1">Value 1</option>
<option value="2">Value 2</option>
<option value="3">Value 3</option>
</select>
</div>
<div class="row">
<input type="checkbox" name="checkbox-input" value="1"> Test
</div>
<div class="row">
<input type="radio" name="radio-input" value="1"> 1
<input type="radio" name="radio-input" value="2"> 2
<input type="radio" name="radio-input" value="3"> 3
</div>
<button type="button" name="button-name">Send</button>
</form>
<style>
</style>
</div>
<script type="text/javascript">
window.onload = () => {
window.editor = grapesjs.init({
height: '100%',
noticeOnUnload: false,
storageManager: false,
container : '#gjs',
fromElement: true,
plugins: ['grapesjs-plugin-forms'],
pluginsOpts: {
'grapesjs-plugin-forms': {}
}
});
};
</script>
</body>
</html>