@themarioga/grid-editor 3.2.1 → 4.1.0

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 (65) hide show
  1. package/BUILDING.md +12 -3
  2. package/CHANGELOG.md +87 -0
  3. package/README.md +79 -7
  4. package/UPGRADING.md +79 -0
  5. package/dist/grideditor.css +188 -20
  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 +10 -0
  9. package/dist/jquery.grideditor.js +924 -174
  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 +34 -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.accordion.js +8 -0
  16. package/dist/plugins/grideditor.accordion.min.js +1 -1
  17. package/dist/plugins/grideditor.accordion.min.js.map +1 -1
  18. package/dist/plugins/grideditor.alignment.js +81 -0
  19. package/dist/plugins/grideditor.alignment.min.js +2 -0
  20. package/dist/plugins/grideditor.alignment.min.js.map +1 -0
  21. package/dist/plugins/grideditor.elements.js +5 -5
  22. package/dist/plugins/grideditor.elements.min.js +1 -1
  23. package/dist/plugins/grideditor.elements.min.js.map +1 -1
  24. package/dist/plugins/grideditor.gutters.js +145 -0
  25. package/dist/plugins/grideditor.gutters.min.js +2 -0
  26. package/dist/plugins/grideditor.gutters.min.js.map +1 -0
  27. package/dist/plugins/grideditor.order.js +206 -0
  28. package/dist/plugins/grideditor.order.min.js +2 -0
  29. package/dist/plugins/grideditor.order.min.js.map +1 -0
  30. package/dist/plugins/grideditor.spacing.js +299 -0
  31. package/dist/plugins/grideditor.spacing.min.js +2 -0
  32. package/dist/plugins/grideditor.spacing.min.js.map +1 -0
  33. package/dist/plugins/grideditor.tabs.js +8 -0
  34. package/dist/plugins/grideditor.tabs.min.js +1 -1
  35. package/dist/plugins/grideditor.tabs.min.js.map +1 -1
  36. package/dist/plugins/grideditor.visibility.js +172 -0
  37. package/dist/plugins/grideditor.visibility.min.js +2 -0
  38. package/dist/plugins/grideditor.visibility.min.js.map +1 -0
  39. package/docs/events.md +26 -8
  40. package/docs/locale-keys.md +54 -0
  41. package/docs/plugins.md +129 -10
  42. package/example/autosave.html +6 -1
  43. package/example/basic.html +8 -2
  44. package/example/breakpoints.html +6 -1
  45. package/example/ckeditor.html +6 -1
  46. package/example/containers.html +5 -1
  47. package/example/elements.html +6 -1
  48. package/example/index.html +24 -1
  49. package/example/locale.html +6 -1
  50. package/example/plugins.html +6 -1
  51. package/example/summernote.html +6 -1
  52. package/example/utilities.html +145 -0
  53. package/example/wrap_content.html +6 -1
  54. package/package.json +3 -2
  55. package/src/js/jquery.grideditor.js +924 -174
  56. package/src/js/locales/grideditor.es.js +34 -0
  57. package/src/js/plugins/grideditor.accordion.js +8 -0
  58. package/src/js/plugins/grideditor.alignment.js +81 -0
  59. package/src/js/plugins/grideditor.elements.js +5 -5
  60. package/src/js/plugins/grideditor.gutters.js +145 -0
  61. package/src/js/plugins/grideditor.order.js +206 -0
  62. package/src/js/plugins/grideditor.spacing.js +299 -0
  63. package/src/js/plugins/grideditor.tabs.js +8 -0
  64. package/src/js/plugins/grideditor.visibility.js +172 -0
  65. package/src/less/grideditor.less +210 -18
@@ -122,6 +122,58 @@ key, so a locale covers a new breakpoint by adding `view.<key>`. Short strings
122
122
  | `view.xxl` | Widescreen | Layout mode writing `col-xxl-*` and `offset-xxl-*` |
123
123
 
124
124
 
125
+ utility.*
126
+ ---------
127
+
128
+ The Responsive section of a settings panel, which the utility plugins fill.
129
+ The labels of each utility and its values are the plugins' own keys.
130
+
131
+ | Key | English | Where |
132
+ | --- | --- | --- |
133
+ | `utility.section` | Responsive: {view} | The section's fold toggle. `{view}` is the label of the view being edited |
134
+ | `utility.default` | Default | The empty choice of a field when nothing below the view sets the utility, and always in the all view |
135
+ | `utility.inherit` | Inherit: {value} (from {breakpoint}) | The empty choice in a breakpoint view when a smaller breakpoint sets the utility. `{breakpoint}` is its key, `sm` |
136
+ | `utility.varies` | Changes at {breakpoints}; choosing here replaces that | Note under a field in the all view when breakpoints set their own value. `{breakpoints}` is a list of keys |
137
+ | `utility.visibility` | Visibility | Label of the visibility plugin's field |
138
+ | `utility.visibility_hidden` | Hidden | Its choice for `d-*-none` |
139
+ | `utility.visibility_shown` | Shown | Its choice for `d-*-block`, or `d-*-flex` on a row |
140
+ | `tool.hide_in_view` | Hide in this view | The visibility plugin's eye, on a node shown in the view being edited |
141
+ | `tool.show_in_view` | Show in this view | The same eye, on a node hidden there |
142
+ | `utility.order` | Order | Label of the order plugin's field |
143
+ | `utility.order_first` | First | Its choice for `order-*-first` |
144
+ | `utility.order_last` | Last | Its choice for `order-*-last` |
145
+ | `tool.order_earlier` | Earlier in this view | The order plugin's left arrow in a column drawer |
146
+ | `tool.order_later` | Later in this view | Its right arrow |
147
+ | `utility.justify_content` | Justify columns | The alignment plugin's `justify-content-*` field, on a row |
148
+ | `utility.align_items` | Align columns | Its `align-items-*` field, on a row |
149
+ | `utility.align_self` | Align self | Its `align-self-*` field, on a column |
150
+ | `utility.gutters` | Gutters | The gutters plugin's `g-*` field, on a row |
151
+ | `utility.gutters_x` | Horizontal gutters | Its `gx-*` field |
152
+ | `utility.gutters_y` | Vertical gutters | Its `gy-*` field |
153
+ | `utility.padding` | Padding | The spacing plugin's padding group |
154
+ | `utility.margin` | Margin | Its margin group |
155
+ | `utility.side_all` | All sides | The side of `p-*` and `m-*` in a group's side choice |
156
+ | `utility.side_x` | Left and right | The side of `px-*` and `mx-*` |
157
+ | `utility.side_y` | Top and bottom | The side of `py-*` and `my-*` |
158
+ | `utility.side_t` | Top | The side of `pt-*` and `mt-*` |
159
+ | `utility.side_b` | Bottom | The side of `pb-*` and `mb-*` |
160
+ | `utility.side_s` | Start | The side of `ps-*` and `ms-*` |
161
+ | `utility.side_e` | End | The side of `pe-*` and `me-*` |
162
+ | `utility.spacing_gutter` | A column's side padding is its gutter: changing it changes the gutter | Note in a column's spacing group while it carries side padding |
163
+
164
+
165
+ badge.*
166
+ -------
167
+
168
+ Text the utility plugins show on the canvas while editing. Never in the
169
+ markup `getHtml` returns.
170
+
171
+ | Key | English | Where |
172
+ | --- | --- | --- |
173
+ | `badge.hidden_in` | Hidden at {breakpoints} | Corner of a node hidden at some breakpoints, in the all view. `{breakpoints}` is a list of keys |
174
+ | `badge.order` | Order: {value} | Corner of a column ordered by class in the view being edited |
175
+
176
+
125
177
  error.*
126
178
  -------
127
179
 
@@ -130,6 +182,8 @@ all the same: the developer reading them is the one who chose the locale.
130
182
 
131
183
  | Key | English | Where |
132
184
  | --- | --- | --- |
185
+ | `error.sortable_missing` | SortableJS not available! … | Logged once when the drag library is not on the page |
186
+ | `warning.setting_removed` | The {setting} setting was removed in 4.0. Use {replacement} instead. | Logged once per removed setting a host still passes |
133
187
  | `error.tinymce_missing` | tinyMCE not available! … | `content_types: ['tinymce']` with no tinyMCE loaded |
134
188
  | `error.ckeditor_missing` | CKEditor not available! … | `content_types: ['ckeditor']` with no CKEditor loaded |
135
189
  | `error.summernote_missing` | Summernote not available! … | `content_types: ['summernote']` with no Summernote loaded |
package/docs/plugins.md CHANGED
@@ -14,11 +14,13 @@ the one to read first if you are about to write your own.
14
14
  <script src="dist/plugins/grideditor.elements.min.js"></script>
15
15
  ```
16
16
 
17
- There are two kinds. A **container plugin** builds a type of container — it
17
+ There are three kinds. A **container plugin** builds a type of container — it
18
18
  registers under `$.fn.gridEditor.containers`, and the toolbar offers a button
19
- for it. A **feature plugin** is anything else the editor can do —
19
+ for it. A **utility plugin** declares families of Bootstrap's responsive
20
+ utility classes — `$.fn.gridEditor.utilities` — and the editor edits them per
21
+ breakpoint. A **feature plugin** is anything else the editor can do —
20
22
  `$.fn.gridEditor.features`, hooks into the canvas, and may contribute methods.
21
- Both are factories called once per editor with the same handle.
23
+ All three are factories called once per editor with the same handle.
22
24
 
23
25
  The `plugins` setting names which of the loaded ones to use:
24
26
 
@@ -114,6 +116,13 @@ not change without a major version.
114
116
  | `ge.emit(name, payload)` | Fire an event and its callbacks; false means a handler canceled |
115
117
  | `ge.payloadFor(kind, node, extra)` | Build a payload the documented way |
116
118
  | `ge.operate(body)` | Run `body` as one operation, so a handler calling back in is queued |
119
+ | `ge.kindOf(node)` | What an event calls a node: `row`, `column`, `element`, a container's type… |
120
+ | `ge.view()` | The view being edited: a breakpoint key, or `'all'` |
121
+ | `ge.viewTiers()` | The breakpoint keys that view writes: one, or all six |
122
+ | `ge.breakpoints` | Every breakpoint key, smallest first |
123
+ | `ge.getUtility(node, family, view?)` | A utility's value, as in the public method |
124
+ | `ge.setUtility(node, family, value, options?)` | Write one through the events. `options` is a view key or `{ view, source }` |
125
+ | `ge.utilityField(node, family)` | A panel field for one family, for a plugin that builds its own panel |
117
126
 
118
127
  The add, delete and move events for a container and its panes are fired by the
119
128
  editor, not by the plugin: `createPaneControls` handles a pane's delete, and
@@ -133,23 +142,37 @@ $.fn.gridEditor.features.elements = function(ge) {
133
142
  onInit: function() { … }, // every init: put the furniture in
134
143
  onDeinit: function() { … }, // every deinit: take it out again
135
144
  onContentReady: function(area) { … }, // a rich text editor just took over
136
- onSortable: function(shared) { … }, // make your own sortables
145
+ onSortable: function(sortable) { … }, // declare your own sortable lists
137
146
  };
138
147
  };
139
148
  ```
140
149
 
141
- - **`onSortable(shared)`** is handed the options the editor's own sortables
142
- use — the handle, the cancel selector, the start and stop handlers — so a
143
- plugin's sortables answer to `drag_handle` and fire the move events like
144
- everything else.
150
+ - **`onSortable(sortable)`** is handed the function the editor makes all of its
151
+ own lists with. A plugin describes a list; it never touches the drag toolkit
152
+ itself, which is what keeps `drag_handle`, the cancel selector and the move
153
+ events the same everywhere:
154
+
155
+ ```javascript
156
+ onSortable: function(sortable) {
157
+ sortable(ge.canvas.find('.ge-content'), {
158
+ draggable: '> .ge-element', // which children move
159
+ group: 'element', // lists sharing a group connect
160
+ });
161
+ }
162
+ ```
163
+
164
+ Leaving `group` out makes a list that sorts only within itself, which is what
165
+ a tab strip wants. Group names are scoped to the editor instance, so two
166
+ editors on one page never drag into each other.
145
167
  - **`methods`** are added to the instance handle. A method the editor
146
168
  documents but a plugin implements — `createElement` — warns and returns null
147
169
  when the plugin is not loaded.
148
170
  - **`kindOf(node)`** returns the `kind` an event should carry for a node the
149
171
  plugin owns, or null.
150
172
 
151
- The core's own sortables and the plugins' are taken down together: jQuery UI
152
- marks what it made, so a plugin does not have to unmake it.
173
+ The core's own lists and the plugins' are taken down together: every list made
174
+ through `sortable()` is registered, so `deinit` unmakes exactly those and a
175
+ plugin does not have to unmake anything.
153
176
 
154
177
 
155
178
  What the editor does for you
@@ -163,3 +186,99 @@ the plugin.
163
186
  Sorting is the one thing a plugin sets up itself, in `mark`, because only the
164
187
  plugin knows which of its parts move: the tabs plugin makes its strip sortable
165
188
  and puts the panes back in strip order in `afterPaneMove`.
189
+
190
+
191
+ Utility plugins
192
+ ---------------
193
+
194
+ A utility plugin edits one of Bootstrap's responsive utility classes — the
195
+ ones spelled `{property}-{breakpoint}-{value}`, like `order-md-2` or
196
+ `d-lg-none` — and hardly has to do anything to do it. It declares **families**,
197
+ and the editor reads, writes, previews and announces them:
198
+
199
+ ```javascript
200
+ $.fn.gridEditor.utilities.order = function(ge) {
201
+ return {
202
+ families: [{
203
+ name: 'order', // what events and setUtility call it
204
+ prefix: 'order', // order-2, order-md-2, order-xxl-2
205
+ values: ['first', 0, 1, 2, 3, 4, 5, 'last'],
206
+ appliesTo: ['column'], // row | column | element | container | a container type
207
+ labelKey: 'utility.order', // the field's label, optional
208
+ label: function(value) { … }, // an option's text, optional: the value itself otherwise
209
+ choices: function(node, kind) { … }, // what to offer this node, optional: every value otherwise
210
+ panel: false, // optional: no field of its own, see "A panel of your own"
211
+ preview: function(value, node, kind) { // what the value looks like, see below
212
+ return { order: value === null ? 0 : value };
213
+ },
214
+ }],
215
+ drawerTools: function(drawer, node, kind) { … }, // optional, tools beside the gear
216
+ onRefresh: function(scope) { … }, // optional, see below
217
+ panel: function(node, kind) { … }, // optional, see "A panel of your own"
218
+ preview: function(node, kind, breakpoint) { … }, // optional, the same
219
+ onViewChange: function(view) { … }, // optional
220
+ };
221
+ };
222
+ ```
223
+
224
+ What the editor does with a family:
225
+
226
+ - **Reading follows the cascade.** A breakpoint's value is its own class or the
227
+ nearest smaller breakpoint's. The all view reads the class with no infix.
228
+ - **Writing depends on the view.** A breakpoint view writes its own tier and
229
+ nothing else. The all view writes the class with no infix and takes the
230
+ family off every other breakpoint, because choosing one value for every size
231
+ is choosing it over what the sizes said; the event says what it took off.
232
+ `null` is inherit: the tier's class comes off.
233
+ - **The panel.** Every node with a gear gets a folded *Responsive* section in
234
+ its settings panel, with a field per family that applies to it. A field shows
235
+ the view being edited, says what it inherits and from which breakpoint, and
236
+ follows the classes field when the user types there.
237
+ - **The preview.** A breakpoint view narrows the canvas, not the window, and
238
+ Bootstrap's utilities answer to the window with `!important`. So in a
239
+ breakpoint view each node that carries a family's class gets
240
+ `preview(value)` — the value that applies there, or `null` — as inline
241
+ `!important` styles. Return what `null` looks like too: a wider breakpoint's
242
+ class is still live in a wide window and has to be overruled. The all view
243
+ previews nothing, since every breakpoint there is live and what Bootstrap
244
+ shows is the truth. The styles come off on `deinit`, leaving the host's own
245
+ `style` as it was, so `getHtml` never sees them.
246
+ - **The events.** Every write goes through `before-utility`, which can cancel
247
+ it, and `after-utility`. See [events.md](events.md).
248
+
249
+ `drawerTools` runs for every drawer that has a gear — rows, columns, elements,
250
+ containers and panes — so a plugin checks `kind` and adds nothing where its
251
+ tool does not belong. A tool writes with `ge.setUtility(node, family, value,
252
+ { source: 'tool' })`, and the panel, the classes field and the preview follow.
253
+
254
+ `onRefresh(scope)` runs whenever the preview is redrawn — on `init`, on a view
255
+ change, after a write, after the user types in a classes field — with the node
256
+ whose utilities changed, or the canvas. It is for what a plugin marks the canvas
257
+ with beyond inline styles: the visibility plugin keeps hidden nodes on the
258
+ canvas and fades them there. Whatever it adds, `onDeinit` takes away.
259
+
260
+ ### A panel of your own
261
+
262
+ A field per family is the right panel for most plugins and the wrong one for
263
+ some: spacing has fourteen families, and fourteen fields. Such a plugin marks
264
+ its families `panel: false` and returns its own element from
265
+ `panel(node, kind)` — or null where it does not apply — and the editor puts it
266
+ in the Responsive section. Inside it, `ge.utilityField(node, family)` makes the
267
+ same field the editor would, and the editor keeps every such field up to date
268
+ with the view and the classes; swapping one field for another is the plugin's
269
+ business. The spacing plugin's panel is a side and one field, and choosing a
270
+ side swaps the field for that side's family.
271
+
272
+ The same plugins tend to need the node as a whole for the preview, because
273
+ their families settle one property between them — `p-3` and `pt-md-1` both
274
+ set the top padding. A plugin-level `preview(node, kind, breakpoint)` is called
275
+ for every node in a breakpoint view, after the families' own, and returns the
276
+ styles for the node or an empty object.
277
+
278
+ Two plugins cannot declare the same family name: the second one is ignored,
279
+ with a warning.
280
+
281
+ Plugin options live in the `utilities` setting, under the plugin's name:
282
+ `utilities: { spacing: { values: ['0', '2', '4'] } }`. The editor passes the
283
+ setting through as it is; each plugin fills in its own defaults.
284
+
@@ -10,16 +10,21 @@
10
10
 
11
11
  <!-- JS dependencies -->
12
12
  <script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
13
- <script src="https://code.jquery.com/ui/1.14.2/jquery-ui.min.js"></script>
14
13
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
15
14
  <script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/6.8.6/tinymce.min.js"></script>
16
15
 
17
16
  <!-- Grid editor CSS -->
18
17
  <link rel="stylesheet" type="text/css" href="../dist/grideditor.css" />
19
18
  <!-- Grid editor javascript -->
19
+ <script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.6/Sortable.min.js"></script>
20
20
  <script src="../dist/jquery.grideditor.min.js"></script>
21
21
  </head>
22
22
  <body>
23
+ <!-- Back to the demo index -->
24
+ <div class="container pt-3">
25
+ <a class="link-secondary" href="index.html"><i class="bi bi-arrow-left"></i> All demos</a>
26
+ </div>
27
+
23
28
  <div class="container py-3">
24
29
  <h2>Grid Editor example - auto save and import/export</h2>
25
30
  <div class="mb-3">
@@ -9,14 +9,15 @@
9
9
 
10
10
  <!-- Javascript dependencies -->
11
11
  <script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
12
- <script src="https://code.jquery.com/ui/1.14.2/jquery-ui.min.js"></script>
13
12
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
14
13
  <script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/6.8.6/tinymce.min.js"></script>
15
14
 
16
15
  <!-- Grid editor CSS -->
17
16
  <link rel="stylesheet" type="text/css" href="../dist/grideditor.css" />
18
17
  <!-- Grid editor javascript -->
19
- <script src="../dist/jquery.grideditor.min.js"></script>
18
+ <!-- The editor with SortableJS inside it. Every other example loads the
19
+ two files separately; a page does one or the other, never both. -->
20
+ <script src="../dist/jquery.grideditor.bundle.min.js"></script>
20
21
 
21
22
  <script>
22
23
  $(function() {
@@ -36,6 +37,11 @@
36
37
  <title>Grid Editor example</title>
37
38
  </head>
38
39
  <body>
40
+ <!-- Back to the demo index -->
41
+ <div class="container pt-3">
42
+ <a class="link-secondary" href="index.html"><i class="bi bi-arrow-left"></i> All demos</a>
43
+ </div>
44
+
39
45
 
40
46
  <div class="container">
41
47
  <div id="myGrid">
@@ -9,12 +9,12 @@
9
9
 
10
10
  <!-- Javascript dependencies -->
11
11
  <script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
12
- <script src="https://code.jquery.com/ui/1.14.2/jquery-ui.min.js"></script>
13
12
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
14
13
 
15
14
  <!-- Grid editor CSS -->
16
15
  <link rel="stylesheet" type="text/css" href="../dist/grideditor.css" />
17
16
  <!-- Grid editor javascript -->
17
+ <script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.6/Sortable.min.js"></script>
18
18
  <script src="../dist/jquery.grideditor.min.js"></script>
19
19
 
20
20
  <script>
@@ -41,6 +41,11 @@
41
41
  <title>Grid Editor breakpoints example</title>
42
42
  </head>
43
43
  <body>
44
+ <!-- Back to the demo index -->
45
+ <div class="container pt-3">
46
+ <a class="link-secondary" href="index.html"><i class="bi bi-arrow-left"></i> All demos</a>
47
+ </div>
48
+
44
49
 
45
50
  <div class="container">
46
51
 
@@ -9,7 +9,6 @@
9
9
 
10
10
  <!-- Javascript dependencies -->
11
11
  <script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
12
- <script src="https://code.jquery.com/ui/1.14.2/jquery-ui.min.js"></script>
13
12
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
14
13
 
15
14
  <!-- Ckeditor js -->
@@ -18,6 +17,7 @@
18
17
  <!-- Grid editor CSS -->
19
18
  <link rel="stylesheet" type="text/css" href="../dist/grideditor.css" />
20
19
  <!-- Grid editor javascript -->
20
+ <script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.6/Sortable.min.js"></script>
21
21
  <script src="../dist/jquery.grideditor.min.js"></script>
22
22
 
23
23
  <script>
@@ -47,6 +47,11 @@
47
47
  <title>Grid Editor example</title>
48
48
  </head>
49
49
  <body>
50
+ <!-- Back to the demo index -->
51
+ <div class="container pt-3">
52
+ <a class="link-secondary" href="index.html"><i class="bi bi-arrow-left"></i> All demos</a>
53
+ </div>
54
+
50
55
 
51
56
  <div class="container">
52
57
  <div id="myGrid">
@@ -9,13 +9,13 @@
9
9
 
10
10
  <!-- Javascript dependencies -->
11
11
  <script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
12
- <script src="https://code.jquery.com/ui/1.14.2/jquery-ui.min.js"></script>
13
12
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
14
13
  <script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/6.8.6/tinymce.min.js"></script>
15
14
 
16
15
  <!-- Grid editor CSS -->
17
16
  <link rel="stylesheet" type="text/css" href="../dist/grideditor.css" />
18
17
  <!-- Grid editor javascript -->
18
+ <script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.6/Sortable.min.js"></script>
19
19
  <script src="../dist/jquery.grideditor.min.js"></script>
20
20
  <!-- One file per container type: load the ones this page offers -->
21
21
  <script src="../dist/plugins/grideditor.tabs.min.js"></script>
@@ -70,6 +70,10 @@
70
70
  <title>Grid Editor containers example</title>
71
71
  </head>
72
72
  <body>
73
+ <!-- Back to the demo index -->
74
+ <div class="container pt-3">
75
+ <a class="link-secondary" href="index.html"><i class="bi bi-arrow-left"></i> All demos</a>
76
+ </div>
73
77
 
74
78
  <div class="container">
75
79
 
@@ -9,13 +9,13 @@
9
9
 
10
10
  <!-- Javascript dependencies -->
11
11
  <script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
12
- <script src="https://code.jquery.com/ui/1.14.2/jquery-ui.min.js"></script>
13
12
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
14
13
  <script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/6.8.6/tinymce.min.js"></script>
15
14
 
16
15
  <!-- Grid editor CSS -->
17
16
  <link rel="stylesheet" type="text/css" href="../dist/grideditor.css" />
18
17
  <!-- Grid editor javascript -->
18
+ <script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.6/Sortable.min.js"></script>
19
19
  <script src="../dist/jquery.grideditor.min.js"></script>
20
20
  <script src="../dist/plugins/grideditor.elements.min.js"></script>
21
21
 
@@ -89,6 +89,11 @@
89
89
  <title>Grid Editor elements example</title>
90
90
  </head>
91
91
  <body>
92
+ <!-- Back to the demo index -->
93
+ <div class="container pt-3">
94
+ <a class="link-secondary" href="index.html"><i class="bi bi-arrow-left"></i> All demos</a>
95
+ </div>
96
+
92
97
 
93
98
  <div class="container">
94
99
 
@@ -21,6 +21,21 @@
21
21
  <code>npm run build</code> after changing anything under
22
22
  <code>src/</code>.
23
23
  </p>
24
+ <p class="text-body-secondary">
25
+ Since 4.0 every gesture works with a finger as well as with a
26
+ mouse &mdash; sorting, resizing a column, dragging a button off the
27
+ toolbar &mdash; so these are worth opening on a phone. The editor
28
+ needs jQuery, <a href="https://sortablejs.github.io/Sortable/">SortableJS</a>
29
+ and Bootstrap 5; the first demo loads
30
+ <code>jquery.grideditor.bundle.min.js</code> instead, which is the
31
+ editor and SortableJS in one file.
32
+ </p>
33
+ <p class="text-body-secondary">
34
+ New in 4.1: utility plugins, which edit Bootstrap's responsive
35
+ utility classes &mdash; visibility, column order, alignment,
36
+ gutters and spacing &mdash; per breakpoint. See
37
+ <a href="utilities.html">Responsive utilities</a>.
38
+ </p>
24
39
 
25
40
  <div class="list-group my-4">
26
41
 
@@ -29,7 +44,7 @@
29
44
  <strong>The editor</strong>
30
45
  <code class="text-body-secondary">basic.html</code>
31
46
  </div>
32
- <span class="text-body-secondary">tinyMCE in the content areas, and the drawer as the drag handle</span>
47
+ <span class="text-body-secondary">tinyMCE in the content areas, the drawer as the drag handle, and the bundled build</span>
33
48
  </a>
34
49
 
35
50
  <a class="list-group-item list-group-item-action" href="plugins.html">
@@ -64,6 +79,14 @@
64
79
  <span class="text-body-secondary">The six breakpoints, the &ldquo;all sizes&rdquo; view, and resizing by dragging</span>
65
80
  </a>
66
81
 
82
+ <a class="list-group-item list-group-item-action" href="utilities.html">
83
+ <div class="d-flex justify-content-between">
84
+ <strong>Responsive utilities</strong>
85
+ <code class="text-body-secondary">utilities.html</code>
86
+ </div>
87
+ <span class="text-body-secondary">Bootstrap's utility classes edited per breakpoint: visibility, column order, alignment, gutters and spacing</span>
88
+ </a>
89
+
67
90
  <a class="list-group-item list-group-item-action" href="locale.html">
68
91
  <div class="d-flex justify-content-between">
69
92
  <strong>Languages</strong>
@@ -9,13 +9,13 @@
9
9
 
10
10
  <!-- Javascript dependencies -->
11
11
  <script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
12
- <script src="https://code.jquery.com/ui/1.14.2/jquery-ui.min.js"></script>
13
12
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
14
13
 
15
14
  <!-- Grid editor CSS -->
16
15
  <link rel="stylesheet" type="text/css" href="../dist/grideditor.css" />
17
16
  <!-- Grid editor javascript, then the locales the page offers. English is
18
17
  built into the plugin; every other language is a file of its own. -->
18
+ <script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.6/Sortable.min.js"></script>
19
19
  <script src="../dist/jquery.grideditor.min.js"></script>
20
20
  <script src="../dist/locales/grideditor.es.js"></script>
21
21
 
@@ -41,6 +41,11 @@
41
41
  <title>Grid Editor locale example</title>
42
42
  </head>
43
43
  <body>
44
+ <!-- Back to the demo index -->
45
+ <div class="container pt-3">
46
+ <a class="link-secondary" href="index.html"><i class="bi bi-arrow-left"></i> All demos</a>
47
+ </div>
48
+
44
49
 
45
50
  <div class="container">
46
51
 
@@ -9,7 +9,6 @@
9
9
 
10
10
  <!-- Javascript dependencies -->
11
11
  <script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
12
- <script src="https://code.jquery.com/ui/1.14.2/jquery-ui.min.js"></script>
13
12
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
14
13
 
15
14
  <!-- Grid editor CSS -->
@@ -17,6 +16,7 @@
17
16
 
18
17
  <!-- The editor, and the plugins this page offers. Loading a file is what
19
18
  makes its feature available; nothing here is in the main bundle. -->
19
+ <script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.6/Sortable.min.js"></script>
20
20
  <script src="../dist/jquery.grideditor.min.js"></script>
21
21
  <script src="../dist/plugins/grideditor.tabs.min.js"></script>
22
22
  <script src="../dist/plugins/grideditor.accordion.min.js"></script>
@@ -111,6 +111,11 @@
111
111
  <title>Grid Editor plugins example</title>
112
112
  </head>
113
113
  <body>
114
+ <!-- Back to the demo index -->
115
+ <div class="container pt-3">
116
+ <a class="link-secondary" href="index.html"><i class="bi bi-arrow-left"></i> All demos</a>
117
+ </div>
118
+
114
119
 
115
120
  <div class="container">
116
121
 
@@ -9,7 +9,6 @@
9
9
 
10
10
  <!-- Javascript dependencies -->
11
11
  <script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
12
- <script src="https://code.jquery.com/ui/1.14.2/jquery-ui.min.js"></script>
13
12
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
14
13
 
15
14
  <!-- Summernote CSS -->
@@ -20,6 +19,7 @@
20
19
  <!-- Grid editor CSS -->
21
20
  <link rel="stylesheet" type="text/css" href="../dist/grideditor.css" />
22
21
  <!-- Grid editor javascript -->
22
+ <script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.6/Sortable.min.js"></script>
23
23
  <script src="../dist/jquery.grideditor.min.js"></script>
24
24
 
25
25
  <script>
@@ -49,6 +49,11 @@
49
49
  <title>Grid Editor example</title>
50
50
  </head>
51
51
  <body>
52
+ <!-- Back to the demo index -->
53
+ <div class="container pt-3">
54
+ <a class="link-secondary" href="index.html"><i class="bi bi-arrow-left"></i> All demos</a>
55
+ </div>
56
+
52
57
 
53
58
  <div class="container">
54
59
  <div id="myGrid">