Update builder.html
Browse files- builder.html +28 -5
builder.html
CHANGED
@@ -121,11 +121,34 @@
|
|
121 |
],
|
122 |
},
|
123 |
});
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
</script>
|
130 |
</body>
|
131 |
</html>
|
|
|
121 |
],
|
122 |
},
|
123 |
});
|
124 |
+
|
125 |
+
// Add blocks for each element
|
126 |
+
editor.BlockManager.add('welcome-block', {
|
127 |
+
label: 'Welcome Title',
|
128 |
+
content: `<h1 class="welcome">Welcome to</h1>`
|
129 |
+
});
|
130 |
+
|
131 |
+
editor.BlockManager.add('big-title-block', {
|
132 |
+
label: 'Big Title',
|
133 |
+
content: `
|
134 |
+
<div class="big-title">
|
135 |
+
<svg class="logo" viewBox="0 0 100 100">
|
136 |
+
<path d="M40 5l-12.9 7.4 -12.9 7.4c-1.4 0.8-2.7 2.3-3.7 3.9 -0.9 1.6-1.5 3.5-1.5 5.1v14.9 14.9c0 1.7 0.6 3.5 1.5 5.1 0.9 1.6 2.2 3.1 3.7 3.9l12.9 7.4 12.9 7.4c1.4 0.8 3.3 1.2 5.2 1.2 1.9 0 3.8-0.4 5.2-1.2l12.9-7.4 12.9-7.4c1.4-0.8 2.7-2.2 3.7-3.9 0.9-1.6 1.5-3.5 1.5-5.1v-14.9 -12.7c0-4.6-3.8-6-6.8-4.2l-28 16.2"/>
|
137 |
+
</svg>
|
138 |
+
<span>GrapesJS</span>
|
139 |
+
</div>
|
140 |
+
`
|
141 |
+
});
|
142 |
+
|
143 |
+
editor.BlockManager.add('description-block', {
|
144 |
+
label: 'Description',
|
145 |
+
content: `<div class="description">This is a demo content from index.html. For the development, you shouldn't edit this file, instead you can copy and rename it to _index.html, on next server start the new file will be served, and it will be ignored by git.</div>`
|
146 |
+
});
|
147 |
+
|
148 |
+
editor.BlockManager.add('button-block', {
|
149 |
+
label: 'Add Button',
|
150 |
+
content: `<button class="add-button">Ещё добавь</button>`
|
151 |
+
});
|
152 |
</script>
|
153 |
</body>
|
154 |
</html>
|