DmitrMakeev commited on
Commit
02f3215
·
verified ·
1 Parent(s): 4cc8c8f

Update builder.html

Browse files
Files changed (1) hide show
  1. builder.html +67 -4
builder.html CHANGED
@@ -10,6 +10,18 @@
10
  <!-- Your Custom CSS -->
11
  <!-- Your Custom CSS -->
12
  <style>
 
 
 
 
 
 
 
 
 
 
 
 
13
  .my-button {
14
  background-color: #4CAF50; /* Green */
15
  border: none;
@@ -37,13 +49,64 @@
37
  height: '100vh',
38
  storageManager: { type: 0 },
39
  plugins: [],
40
- pluginsOpts: {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  });
42
 
43
- // Example of adding a block with a button
44
  const blockManager = editor.BlockManager;
45
- blockManager.add('my-button-block', {
46
- label: 'My Button',
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  content: `<button class="my-button">Click Me</button>`,
48
  attributes: { class: 'gjs-block-section' }
49
  });
 
10
  <!-- Your Custom CSS -->
11
  <!-- Your Custom CSS -->
12
  <style>
13
+ .gjs-row {
14
+ display: flex;
15
+ justify-content: space-between;
16
+ border: 1px dashed #ccc; /* Добавляем контур для строк */
17
+ }
18
+ .gjs-cell {
19
+ flex: 1;
20
+ border: 1px solid #ccc; /* Добавляем контур для ячеек */
21
+ padding: 10px;
22
+ text-align: center;
23
+ min-height: 50px; /* Добавляем минимальную высоту для ячеек */
24
+ }
25
  .my-button {
26
  background-color: #4CAF50; /* Green */
27
  border: none;
 
49
  height: '100vh',
50
  storageManager: { type: 0 },
51
  plugins: [],
52
+ pluginsOpts: {},
53
+ styleManager: {
54
+ sectors: [
55
+ {
56
+ name: 'Dimensions',
57
+ properties: [
58
+ {
59
+ type: 'number',
60
+ label: 'Width',
61
+ property: 'width',
62
+ units: ['px', '%'],
63
+ min: 0,
64
+ },
65
+ {
66
+ type: 'number',
67
+ label: 'Height',
68
+ property: 'height',
69
+ units: ['px', '%'],
70
+ min: 0,
71
+ },
72
+ ],
73
+ },
74
+ {
75
+ name: 'Colors',
76
+ properties: [
77
+ {
78
+ type: 'color',
79
+ label: 'Background Color',
80
+ property: 'background-color',
81
+ },
82
+ {
83
+ type: 'color',
84
+ label: 'Text Color',
85
+ property: 'color',
86
+ },
87
+ ],
88
+ },
89
+ ],
90
+ },
91
  });
92
 
93
+ // Example of adding a horizontal block with three items
94
  const blockManager = editor.BlockManager;
95
+ blockManager.add('horizontal-block', {
96
+ label: 'Horizontal Block',
97
+ content: `
98
+ <div class="gjs-row">
99
+ <div class="gjs-cell"></div>
100
+ <div class="gjs-cell"></div>
101
+ <div class="gjs-cell"></div>
102
+ </div>
103
+ `,
104
+ attributes: { class: 'gjs-block-section' }
105
+ });
106
+
107
+ // Example of adding a draggable button
108
+ blockManager.add('draggable-button', {
109
+ label: 'Draggable Button',
110
  content: `<button class="my-button">Click Me</button>`,
111
  attributes: { class: 'gjs-block-section' }
112
  });