DmitrMakeev commited on
Commit
5a8ce60
·
verified ·
1 Parent(s): 4d5d029

Update builder.html

Browse files
Files changed (1) hide show
  1. builder.html +33 -6
builder.html CHANGED
@@ -7,10 +7,9 @@
7
  <!-- GrapesJS CSS -->
8
  <link rel="stylesheet" href="https://unpkg.com/grapesjs/dist/css/grapes.min.css">
9
 
10
-
11
  <!-- Your Custom CSS -->
12
  <style>
13
- /* Styles for rows */
14
  .gjs-row {
15
  display: flex;
16
  justify-content: space-between;
@@ -19,13 +18,28 @@
19
  text-align: center;
20
  min-height: 50px;
21
  }
22
- /* Styles for cells */
23
  .gjs-cell {
24
  border: 1px solid #ccc;
25
  padding: 10px;
26
  text-align: center;
27
  min-height: 50px;
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  </style>
30
  </head>
31
  <body>
@@ -70,10 +84,10 @@
70
  },
71
  });
72
 
73
- // Add a block with custom components
74
  const blockManager = editor.BlockManager;
75
- blockManager.add('horizontal-block', {
76
- label: 'Horizontal Block',
77
  content: `
78
  <div class="gjs-row">
79
  <div class="gjs-cell"></div>
@@ -83,6 +97,19 @@
83
  `,
84
  attributes: { class: 'gjs-block-section' }
85
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  </script>
87
  </body>
88
  </html>
 
7
  <!-- GrapesJS CSS -->
8
  <link rel="stylesheet" href="https://unpkg.com/grapesjs/dist/css/grapes.min.css">
9
 
 
10
  <!-- Your Custom CSS -->
11
  <style>
12
+ /* Default styles */
13
  .gjs-row {
14
  display: flex;
15
  justify-content: space-between;
 
18
  text-align: center;
19
  min-height: 50px;
20
  }
 
21
  .gjs-cell {
22
  border: 1px solid #ccc;
23
  padding: 10px;
24
  text-align: center;
25
  min-height: 50px;
26
  }
27
+
28
+ /* Working styles */
29
+ .gjs-row-working {
30
+ display: flex;
31
+ justify-content: space-between;
32
+ border: 2px solid #ff0000; /* Red border for working style */
33
+ padding: 10px;
34
+ text-align: center;
35
+ min-height: 50px;
36
+ }
37
+ .gjs-cell-working {
38
+ border: 2px solid #0000ff; /* Blue border for working style */
39
+ padding: 10px;
40
+ text-align: center;
41
+ min-height: 50px;
42
+ }
43
  </style>
44
  </head>
45
  <body>
 
84
  },
85
  });
86
 
87
+ // Add a block with default styles
88
  const blockManager = editor.BlockManager;
89
+ blockManager.add('horizontal-block-default', {
90
+ label: 'Horizontal Block (Default)',
91
  content: `
92
  <div class="gjs-row">
93
  <div class="gjs-cell"></div>
 
97
  `,
98
  attributes: { class: 'gjs-block-section' }
99
  });
100
+
101
+ // Add a block with working styles
102
+ blockManager.add('horizontal-block-working', {
103
+ label: 'Horizontal Block (Working)',
104
+ content: `
105
+ <div class="gjs-row-working">
106
+ <div class="gjs-cell-working"></div>
107
+ <div class="gjs-cell-working"></div>
108
+ <div class="gjs-cell-working"></div>
109
+ </div>
110
+ `,
111
+ attributes: { class: 'gjs-block-section' }
112
+ });
113
  </script>
114
  </body>
115
  </html>