@themarioga/grid-editor 5.3.1 → 6.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/BUILDING.md +2 -4
  2. package/CHANGELOG.md +59 -0
  3. package/README.md +34 -8
  4. package/UPGRADING.md +57 -12
  5. package/dist/grideditor.css +179 -100
  6. package/dist/grideditor.min.css +1 -1
  7. package/dist/grideditor.min.css.map +1 -1
  8. package/dist/jquery.grideditor.bundle.min.js +2 -2
  9. package/dist/jquery.grideditor.js +490 -432
  10. package/dist/jquery.grideditor.min.js +1 -1
  11. package/dist/jquery.grideditor.min.js.map +1 -1
  12. package/dist/locales/grideditor.es.js +12 -0
  13. package/dist/locales/grideditor.es.min.js +1 -1
  14. package/dist/locales/grideditor.es.min.js.map +1 -1
  15. package/dist/plugins/grideditor.ckeditor.js +2 -1
  16. package/dist/plugins/grideditor.ckeditor.min.js.map +1 -1
  17. package/dist/plugins/grideditor.clipboard.js +1 -11
  18. package/dist/plugins/grideditor.clipboard.min.js +1 -1
  19. package/dist/plugins/grideditor.clipboard.min.js.map +1 -1
  20. package/dist/plugins/grideditor.elements.js +66 -38
  21. package/dist/plugins/grideditor.elements.min.js +1 -1
  22. package/dist/plugins/grideditor.elements.min.js.map +1 -1
  23. package/dist/plugins/grideditor.sections.js +2 -2
  24. package/dist/plugins/grideditor.sections.min.js +1 -1
  25. package/dist/plugins/grideditor.sections.min.js.map +1 -1
  26. package/dist/plugins/grideditor.spacing.js +1 -1
  27. package/dist/plugins/grideditor.spacing.min.js +1 -1
  28. package/dist/plugins/grideditor.spacing.min.js.map +1 -1
  29. package/dist/plugins/grideditor.summernote.js +2 -1
  30. package/dist/plugins/grideditor.summernote.min.js.map +1 -1
  31. package/dist/plugins/grideditor.tinymce.js +2 -1
  32. package/dist/plugins/grideditor.tinymce.min.js.map +1 -1
  33. package/docs/events.md +4 -3
  34. package/docs/locale-keys.md +23 -0
  35. package/docs/plugins.md +18 -20
  36. package/example/attributes.html +21 -37
  37. package/example/elements.html +25 -20
  38. package/example/plugins.html +5 -5
  39. package/example/utilities.html +31 -8
  40. package/package.json +1 -1
  41. package/src/js/jquery.grideditor.js +489 -34
  42. package/src/js/locales/grideditor.es.js +12 -0
  43. package/src/js/plugins/grideditor.ckeditor.js +2 -1
  44. package/src/js/plugins/grideditor.clipboard.js +1 -11
  45. package/src/js/plugins/grideditor.elements.js +66 -38
  46. package/src/js/plugins/grideditor.sections.js +2 -2
  47. package/src/js/plugins/grideditor.spacing.js +1 -1
  48. package/src/js/plugins/grideditor.summernote.js +2 -1
  49. package/src/js/plugins/grideditor.tinymce.js +2 -1
  50. package/src/less/grideditor.less +203 -112
  51. package/src/js/compat/bundled-texts.js +0 -14
@@ -47,6 +47,18 @@
47
47
  'tool.indent_increase': 'Aumentar sangría\n(Mayús para el máximo)',
48
48
  'tool.edit_source': 'Editar el código fuente',
49
49
  'tool.preview': 'Vista previa',
50
+ 'panel.title': 'Ajustes: {kind}',
51
+ 'panel.close': 'Cerrar',
52
+ 'panel.done': 'Hecho',
53
+ 'panel.id': 'Id',
54
+ 'panel.classes': 'Clases',
55
+ 'panel.kind_row': 'Fila',
56
+ 'panel.kind_column': 'Columna',
57
+ 'panel.kind_text': 'Texto',
58
+ 'panel.kind_element': 'Elemento',
59
+ 'panel.kind_section': 'Sección',
60
+ 'panel.kind_tab': 'Pestaña',
61
+ 'panel.kind_accordion_item': 'Elemento de acordeón',
50
62
  'tool.id_placeholder': 'id',
51
63
  'tool.id_title': 'Asignar un identificador único',
52
64
  'tool.classes_placeholder': 'clases',
@@ -10,7 +10,8 @@
10
10
  * <script src="dist/jquery.grideditor.min.js"></script>
11
11
  * <script src="dist/plugins/grideditor.ckeditor.min.js"></script>
12
12
  *
13
- * Up to 6.0 the main bundle carries a copy of this file too.
13
+ * Up to 5.x the main bundle carried a copy of this file; since 6.0 it is
14
+ * loaded on its own, like every plugin.
14
15
  */
15
16
  (function($) {
16
17
 
@@ -140,17 +140,7 @@ $.fn.gridEditor.features.clipboard = function(ge) {
140
140
  var clip = read();
141
141
  if (!fits(clip, categories)) { return; }
142
142
 
143
- var node = fresh(clip.html);
144
- var into = target;
145
-
146
- // An element goes into the column's last content area. With none,
147
- // the column's next init wraps it in one of its own
148
- if (clip.category === 'element') {
149
- var area = target.find('> .ge-text-block > .ge-content, > .ge-content').last();
150
- if (area.length) { into = area; }
151
- }
152
-
153
- ge.place(node, clip.kind, { appendTo: into, source: 'paste' });
143
+ ge.place(fresh(clip.html), clip.kind, { appendTo: target, source: 'paste' });
154
144
  }
155
145
 
156
146
  /**
@@ -2,12 +2,16 @@
2
2
  * Element level controls for grid-editor.
3
3
  *
4
4
  * A feature plugin: load this file after the editor and the nodes a host
5
- * marked inside a content area become elements - one movable, deletable thing
6
- * each, instead of rich text. What it can ask the editor for is the handle its
7
- * factory is called with, described in docs/plugins.md.
5
+ * marked become elements - one movable, deletable block each, in the column
6
+ * beside the texts, instead of rich text. What it can ask the editor for is
7
+ * the handle its factory is called with, described in docs/plugins.md.
8
8
  *
9
9
  * <script src="dist/jquery.grideditor.min.js"></script>
10
10
  * <script src="dist/plugins/grideditor.elements.min.js"></script>
11
+ *
12
+ * Up to 5.x an element lived inside a content area, among the text. Markup
13
+ * saved that way still loads: the editor takes each element out of the text
14
+ * it sits in, which is what `cuts` is for.
11
15
  */
12
16
  (function($) {
13
17
 
@@ -17,37 +21,41 @@ $.extend($.fn.gridEditor.locales.en, {
17
21
  'confirm.delete_element': 'Delete element?',
18
22
  });
19
23
 
24
+ /** A column's children that are something else than an element, whatever elements.auto says. */
25
+ var NOT_ELEMENTS = '.row, .ge-content, .ge-text-block, [data-ge-container], .ge-tools-drawer, .ge-resize-handle';
26
+
20
27
  $.fn.gridEditor.features.elements = function(ge) {
21
28
 
29
+ var warnedIntoText = false;
30
+
22
31
  function elementsEnabled() {
23
32
  if (ge.settings.elements.enabled !== 'auto') { return !!ge.settings.elements.enabled; }
24
33
 
25
34
  return ge.settings.elements.auto || ge.canvas.find(ge.settings.elements.selector).length > 0;
26
35
  }
27
36
 
28
- function elementsIn(contentArea) {
37
+ /** Whether a child of a column is an element. */
38
+ function isElement(node) {
29
39
  return ge.settings.elements.auto
30
- ? contentArea.children()
31
- : contentArea.children(ge.settings.elements.selector);
40
+ ? !node.is(NOT_ELEMENTS)
41
+ : node.is(ge.settings.elements.selector);
32
42
  }
33
43
 
34
44
  function markElements() {
35
45
  if (!elementsEnabled()) { return; }
36
46
 
37
- ge.canvas.find('.ge-content').each(function() {
38
- elementsIn($(this)).each(function() {
39
- var element = $(this).addClass('ge-element').attr('contenteditable', 'false');
47
+ ge.canvas.find('.column').children().each(function() {
48
+ var element = $(this);
49
+ if (!element.hasClass('ge-element') && !isElement(element)) { return; }
40
50
 
41
- if (element.find('> .ge-tools-drawer').length) { return; }
42
-
43
- createElementControls(element);
44
- });
51
+ element.addClass('ge-element');
52
+ if (!element.find('> .ge-tools-drawer').length) { createElementControls(element); }
45
53
  });
46
54
  }
47
55
 
48
56
  function unmarkElements() {
49
57
  ge.canvas.find('.ge-element').each(function() {
50
- var element = $(this).removeClass('ge-element').removeAttr('contenteditable');
58
+ var element = $(this).removeClass('ge-element');
51
59
 
52
60
  // A host element that had no class of its own should not come
53
61
  // back from getHtml carrying an empty one
@@ -56,16 +64,7 @@ $.fn.gridEditor.features.elements = function(ge) {
56
64
  }
57
65
 
58
66
  function createElementControls(element) {
59
- // data-mce-bogus="all" is how tinyMCE is told that a node is the
60
- // editor's furniture rather than content: it leaves the subtree
61
- // alone and keeps it out of what it serializes. Without it the
62
- // drawer's tools are inline elements with no text, which is
63
- // exactly what its cleanup removes, so an element inside an open
64
- // editor would lose its move and delete tools.
65
- var drawer = $('<div class="ge-tools-drawer ge-element-drawer" />')
66
- .attr('data-mce-bogus', 'all')
67
- .prependTo(element)
68
- ;
67
+ var drawer = $('<div class="ge-tools-drawer ge-element-drawer" />').prependTo(element);
69
68
 
70
69
  ge.createMoveTool(drawer);
71
70
  ge.createTool(drawer, ge.t('tool.element_info', { name: elementName(element) }),
@@ -93,6 +92,32 @@ $.fn.gridEditor.features.elements = function(ge) {
93
92
  return label || type || element[0].tagName.toLowerCase();
94
93
  }
95
94
 
95
+ /**
96
+ * Placed into a content area, as 5.x did, an element would be text
97
+ * again, and the next init would cut it out. So it goes beside that
98
+ * content area instead - after it for appendTo, before it for
99
+ * prependTo - with a word to the host.
100
+ */
101
+ function placementBesideText(options) {
102
+ var placed = $.extend({}, options);
103
+
104
+ [['appendTo', 'insertAfter'], ['prependTo', 'insertBefore']].forEach(function(pair) {
105
+ var target = options[pair[0]] !== undefined ? $(options[pair[0]]) : null;
106
+ if (!target || !target.is('.ge-content')) { return; }
107
+
108
+ if (!warnedIntoText) {
109
+ warnedIntoText = true;
110
+ ge.warn('createElement: an element is a block of the column since 6.0, not part of a ' +
111
+ 'content area\'s text; it goes beside the content area. Place it in a column instead.');
112
+ }
113
+
114
+ delete placed[pair[0]];
115
+ placed[pair[1]] = target.parent('.ge-text-block').length ? target.parent() : target;
116
+ });
117
+
118
+ return placed;
119
+ }
120
+
96
121
  function apiCreateElement(content, options) {
97
122
  options = options || {};
98
123
 
@@ -104,7 +129,7 @@ $.fn.gridEditor.features.elements = function(ge) {
104
129
  element.attr('data-ge-label', options.label);
105
130
  }
106
131
 
107
- return ge.place(element, 'element', options);
132
+ return ge.place(element, 'element', placementBesideText(options));
108
133
  }
109
134
 
110
135
  return {
@@ -117,24 +142,27 @@ $.fn.gridEditor.features.elements = function(ge) {
117
142
  return node.hasClass('ge-element') ? 'element' : null;
118
143
  },
119
144
 
120
- onInit: markElements,
121
- onDeinit: unmarkElements,
122
-
123
145
  /**
124
- * An editor rewrites the content area as it takes it over, drawers
125
- * included, so they go back in when it says it is ready.
146
+ * An element cuts the text it sits in: 5.x's markup, or markup a host
147
+ * wrote the same way, has it inside a content area, and it comes out.
126
148
  */
127
- onContentReady: markElements,
149
+ cuts: function() {
150
+ if (!elementsEnabled()) { return null; }
128
151
 
129
- /** Elements move within a content area and between them. */
130
- onSortable: function(sortable) {
131
- if (!elementsEnabled()) { return; }
152
+ return ge.settings.elements.auto ? '*' : ge.settings.elements.selector;
153
+ },
132
154
 
133
- sortable(ge.canvas.find('.ge-content'), {
134
- draggable: '.ge-element',
135
- group: 'element',
136
- });
155
+ // A block the columns move, beside the texts, the rows and the
156
+ // containers - and only the columns
157
+ blocks: '.ge-element',
158
+ accepts: function(region, node) {
159
+ if (node.hasClass('ge-element')) { return region.is('.column'); }
160
+
161
+ return true;
137
162
  },
163
+
164
+ onInit: markElements,
165
+ onDeinit: unmarkElements,
138
166
  };
139
167
  };
140
168
 
@@ -90,7 +90,7 @@ $.fn.gridEditor.features.sections = function(ge) {
90
90
  });
91
91
 
92
92
  if (!ge.emit('before-utility', payload)) {
93
- section.find('> .ge-tools-drawer .ge-section-width select').val(from);
93
+ ge.detailsOf(section).find('.ge-section-width select').val(from);
94
94
  return false;
95
95
  }
96
96
 
@@ -102,7 +102,7 @@ $.fn.gridEditor.features.sections = function(ge) {
102
102
  }
103
103
 
104
104
  function widthField(section) {
105
- var select = $('<select />');
105
+ var select = $('<select class="form-select form-select-sm" />');
106
106
  var current = widthOf(section);
107
107
  var offered = options.widths.indexOf(current) === -1 ? options.widths.concat([current]) : options.widths;
108
108
 
@@ -183,7 +183,7 @@ $.fn.gridEditor.utilities.spacing = function(ge) {
183
183
  /** A padding or margin group: its name, the side, and the field of that side's family. */
184
184
  function group(node, key, labelText) {
185
185
  var box = $('<div class="ge-spacing-group" />').attr('data-ge-spacing', key);
186
- var side = $('<select class="ge-spacing-side" />');
186
+ var side = $('<select class="ge-spacing-side form-select form-select-sm" />');
187
187
 
188
188
  $('<span class="ge-utility-label" />').text(labelText).appendTo(box);
189
189
 
@@ -10,7 +10,8 @@
10
10
  * <script src="dist/jquery.grideditor.min.js"></script>
11
11
  * <script src="dist/plugins/grideditor.summernote.min.js"></script>
12
12
  *
13
- * Up to 6.0 the main bundle carries a copy of this file too.
13
+ * Up to 5.x the main bundle carried a copy of this file; since 6.0 it is
14
+ * loaded on its own, like every plugin.
14
15
  */
15
16
  (function($) {
16
17
 
@@ -10,7 +10,8 @@
10
10
  * <script src="dist/jquery.grideditor.min.js"></script>
11
11
  * <script src="dist/plugins/grideditor.tinymce.min.js"></script>
12
12
  *
13
- * Up to 6.0 the main bundle carries a copy of this file too.
13
+ * Up to 5.x the main bundle carried a copy of this file; since 6.0 it is
14
+ * loaded on its own, like every plugin.
14
15
  */
15
16
  (function($) {
16
17
 
@@ -157,6 +157,177 @@
157
157
  .ge-tools-drawer .ge-details {
158
158
  cursor: auto;
159
159
  }
160
+ /* An info tool does nothing when clicked, so it is somewhere to hold */
161
+ .ge-tools-drawer > a.ge-text-info,
162
+ .ge-tools-drawer > a.ge-element-info {
163
+ cursor: move;
164
+ }
165
+ /* A text's drawer sits over the text, small, and is mostly tools: a grip
166
+ at its start says where to take hold of it */
167
+ .ge-text-block > .ge-text-drawer {
168
+ padding-left: 14px;
169
+
170
+ &::before {
171
+ content: '';
172
+ position: absolute;
173
+ top: 50%;
174
+ left: 4px;
175
+ width: 6px;
176
+ height: 14px;
177
+ transform: translateY(-50%);
178
+ background-image: radial-gradient(circle, @textTextColor 1px, transparent 1.3px);
179
+ background-size: 3px 3px;
180
+ opacity: 0.7;
181
+ }
182
+ }
183
+ }
184
+
185
+ /* A node's settings, wherever settings_panel shows them: in its drawer, or
186
+ in one of Bootstrap's offcanvas, popover or modal, outside the canvas. The
187
+ fields are Bootstrap's own - form-control-sm, form-select-sm,
188
+ btn-outline-secondary - and this only lays them out. */
189
+ .ge-details {
190
+ font-size: 0.8125rem;
191
+
192
+ .ge-details-general {
193
+ display: flex;
194
+ flex-direction: column;
195
+ gap: 8px;
196
+ }
197
+ .ge-field {
198
+ display: flex;
199
+ flex-direction: column;
200
+ gap: 2px;
201
+ margin: 0;
202
+ }
203
+ .ge-field-label,
204
+ .ge-utility-label {
205
+ color: var(--bs-secondary-color, #6c757d);
206
+ font-size: 0.75rem;
207
+ }
208
+ .ge-presets:empty {
209
+ display: none;
210
+ }
211
+
212
+ /* The utility plugins' fields, folded under one toggle */
213
+ .ge-utilities {
214
+ margin-top: 10px;
215
+
216
+ > .ge-utilities-toggle {
217
+ display: block;
218
+ color: var(--bs-body-color, #333);
219
+ font-weight: 500;
220
+ cursor: pointer;
221
+ text-decoration: none;
222
+
223
+ &::before {
224
+ content: '\25B8';
225
+ display: inline-block;
226
+ width: 1em;
227
+ }
228
+ }
229
+ &.ge-open > .ge-utilities-toggle::before {
230
+ content: '\25BE';
231
+ }
232
+
233
+ > .ge-utilities-body {
234
+ display: none;
235
+ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
236
+ gap: 8px 10px;
237
+ margin-top: 6px;
238
+ }
239
+ &.ge-open > .ge-utilities-body {
240
+ display: grid;
241
+ }
242
+
243
+ .ge-utility {
244
+ display: flex;
245
+ flex-direction: column;
246
+ gap: 2px;
247
+ margin: 0;
248
+ }
249
+ .ge-utility-note {
250
+ color: var(--bs-secondary-color, #666);
251
+ font-size: 0.6875rem;
252
+ }
253
+
254
+ /* The spacing plugin: a side and a value per group */
255
+ .ge-spacing {
256
+ display: grid;
257
+ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
258
+ gap: 8px 10px;
259
+ grid-column: 1 / -1;
260
+ }
261
+ .ge-spacing-group {
262
+ display: flex;
263
+ flex-direction: column;
264
+ gap: 2px;
265
+
266
+ /* The group names the field once */
267
+ .ge-utility > .ge-utility-label {
268
+ display: none;
269
+ }
270
+ }
271
+ .ge-spacing-gutter {
272
+ grid-column: 1 / -1;
273
+ color: var(--bs-secondary-color, #666);
274
+ font-size: 0.6875rem;
275
+ }
276
+ }
277
+ }
278
+
279
+ /* In a drawer it is part of the drawer, compact */
280
+ .ge-tools-drawer > .ge-details {
281
+ font-size: 11px;
282
+
283
+ .ge-utilities > .ge-utilities-body {
284
+ grid-template-columns: repeat(auto-fill, minmax(120px, 160px));
285
+ }
286
+ }
287
+
288
+ /* In one of Bootstrap's, outside the canvas */
289
+ .ge-settings-panel {
290
+ .ge-details {
291
+ display: block;
292
+ }
293
+ .ge-settings-title {
294
+ font-size: 1rem;
295
+ font-weight: 500;
296
+ }
297
+ }
298
+
299
+ .ge-settings-offcanvas {
300
+ /* Beside the canvas rather than over most of it */
301
+ --bs-offcanvas-width: 340px;
302
+ --bs-offcanvas-height: 60vh;
303
+ }
304
+
305
+ .ge-settings-popover {
306
+ /* Popper would position it; without Popper that is the editor's job */
307
+ position: absolute;
308
+ --bs-popover-max-width: 360px;
309
+ width: 360px;
310
+ max-width: calc(100vw - 16px);
311
+
312
+ > .popover-header {
313
+ display: flex;
314
+ align-items: center;
315
+ justify-content: space-between;
316
+ gap: 8px;
317
+
318
+ > .btn-close {
319
+ font-size: 0.65rem;
320
+ }
321
+ }
322
+ > .popover-body {
323
+ overflow-y: auto;
324
+ }
325
+ }
326
+
327
+ /* The node whose settings are open */
328
+ .ge-canvas.ge-editing .ge-settings-target {
329
+ outline: 2px solid var(--bs-primary, #0d6efd);
330
+ outline-offset: 1px;
160
331
  }
161
332
 
162
333
  /* While editing */
@@ -195,113 +366,24 @@
195
366
  background: rgba(255, 255, 255, 0.5);
196
367
  cursor: pointer;
197
368
  }
198
- .ge-details {
369
+ /* A node's settings, unfolded in its drawer: settings_panel 'inline' */
370
+ > .ge-details {
371
+ display: none;
199
372
  padding: 5px;
200
373
  border-top: 1px solid rgba(0,0,0,0.05);
201
- display: none;
202
-
203
- .btn-group {
204
- a {
205
- color: #333;
206
-
207
- &.active {
208
- color: white;
209
- }
210
- }
211
- a:hover {
212
- text-decoration: none;
213
- cursor: pointer;
214
- }
374
+ text-align: left;
375
+ cursor: auto;
376
+
377
+ .ge-details-general {
378
+ flex-direction: row;
379
+ align-items: flex-end;
215
380
  }
216
- input.ge-id,
217
- input.ge-classes {
218
- border: 1px solid #7F7F7F;
219
- border-radius: 4px;
220
- font-size: 11px;
221
- padding: 2px 5px;
222
- margin-right: 5px;
223
- width: 80px;
381
+ input.ge-id {
382
+ width: 90px;
224
383
  }
225
384
  input.ge-classes {
226
385
  width: 200px;
227
386
  }
228
-
229
- /* The utility plugins' fields, folded under one toggle */
230
- .ge-utilities {
231
- margin-top: 5px;
232
- font-size: 11px;
233
-
234
- > .ge-utilities-toggle {
235
- color: #333;
236
- cursor: pointer;
237
- text-decoration: none;
238
-
239
- &::before {
240
- content: '\25B8';
241
- display: inline-block;
242
- width: 1em;
243
- }
244
- }
245
- &.ge-open > .ge-utilities-toggle::before {
246
- content: '\25BE';
247
- }
248
-
249
- > .ge-utilities-body {
250
- display: none;
251
- flex-wrap: wrap;
252
- gap: 4px 10px;
253
- margin-top: 4px;
254
- }
255
- &.ge-open > .ge-utilities-body {
256
- display: flex;
257
- }
258
-
259
- .ge-utility {
260
- display: inline-flex;
261
- flex-direction: column;
262
- margin: 0;
263
-
264
- select {
265
- border: 1px solid #7F7F7F;
266
- border-radius: 4px;
267
- font-size: 11px;
268
- padding: 1px 2px;
269
- }
270
- }
271
- .ge-utility-note {
272
- color: #666;
273
- font-size: 10px;
274
- max-width: 160px;
275
- }
276
-
277
- /* The spacing plugin: a side and a value per group */
278
- .ge-spacing {
279
- display: flex;
280
- flex-wrap: wrap;
281
- gap: 4px 10px;
282
- }
283
- .ge-spacing-group {
284
- display: inline-flex;
285
- flex-direction: column;
286
-
287
- > .ge-spacing-side {
288
- border: 1px solid #7F7F7F;
289
- border-radius: 4px;
290
- font-size: 11px;
291
- padding: 1px 2px;
292
- margin-bottom: 2px;
293
- }
294
- /* The group names the field once */
295
- .ge-utility > .ge-utility-label {
296
- display: none;
297
- }
298
- }
299
- .ge-spacing-gutter {
300
- flex-basis: 100%;
301
- color: #666;
302
- font-size: 10px;
303
- }
304
- }
305
387
  }
306
388
  }
307
389
  .row {
@@ -603,6 +685,23 @@
603
685
  }
604
686
  }
605
687
 
688
+ /* While the text is being edited it would sit over the end of its
689
+ first line, so it stands back - faint, still there to click - until
690
+ the pointer is on the drawer itself */
691
+ &:has(> .ge-rte-active) > .ge-text-drawer:not(:hover) {
692
+ opacity: 0.35;
693
+ }
694
+
695
+ /* Except when something in it is in use: its settings, a choice it
696
+ offers, a drag */
697
+ &.ge-drag-chosen,
698
+ &:has(> .ge-text-drawer.ge-picker-open),
699
+ &:has(> .ge-text-drawer > .ge-details[style*="block"]) {
700
+ > .ge-text-drawer:not(:hover) {
701
+ opacity: 1;
702
+ }
703
+ }
704
+
606
705
  /* With its settings open it spans the text, so the panel has room */
607
706
  &:has(> .ge-text-drawer > .ge-details[style*="block"]) > .ge-text-drawer {
608
707
  left: 0;
@@ -961,19 +1060,11 @@
961
1060
  }
962
1061
 
963
1062
  /* The width field, in the section's settings panel beside id and classes */
964
- .ge-canvas.ge-editing .ge-details .ge-section-width {
965
- display: inline-flex;
966
- align-items: center;
967
- gap: 4px;
1063
+ .ge-details .ge-section-width {
1064
+ display: flex;
1065
+ flex-direction: column;
1066
+ gap: 2px;
968
1067
  margin: 0;
969
- font-size: 11px;
970
-
971
- select {
972
- border: 1px solid #7F7F7F;
973
- border-radius: 4px;
974
- font-size: 11px;
975
- padding: 1px 2px;
976
- }
977
1068
  }
978
1069
 
979
1070
  @ge-section-classes: container, container-sm, container-md, container-lg, container-xl, container-xxl;
@@ -1,14 +0,0 @@
1
- /**
2
- * Up to 6.0 the main bundle carries a copy of each text editor plugin, so a
3
- * page that loaded only the editor keeps the editor it had. This marks those
4
- * copies, and the editor warns once when a content area is edited with one:
5
- * 6.0 leaves them out. Loaded on its own, a plugin's file registers itself
6
- * again, unmarked, and is the one used.
7
- *
8
- * Only ever concatenated after the plugins it marks, never built on its own.
9
- */
10
- (function($) {
11
- ['tinymce', 'ckeditor', 'summernote'].forEach(function(type) {
12
- if ($.fn.gridEditor.texts[type]) { $.fn.gridEditor.texts[type].bundled = true; }
13
- });
14
- })(jQuery);