@themarioga/grid-editor 9.0.0-beta.7 → 9.0.0-beta.8

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 (52) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +29 -15
  3. package/UPGRADING.md +1 -1
  4. package/dist/grideditor.bundle.min.js +2 -2
  5. package/dist/grideditor.css +24 -3
  6. package/dist/grideditor.d.ts +20 -0
  7. package/dist/grideditor.esm.js +10 -1
  8. package/dist/grideditor.js +10 -1
  9. package/dist/grideditor.min.css +1 -1
  10. package/dist/grideditor.min.css.map +1 -1
  11. package/dist/grideditor.min.js +1 -1
  12. package/dist/grideditor.min.js.map +3 -3
  13. package/dist/locales/grideditor.es.esm.js +1 -0
  14. package/dist/locales/grideditor.es.js +1 -0
  15. package/dist/locales/grideditor.es.min.js +1 -1
  16. package/dist/locales/grideditor.es.min.js.map +2 -2
  17. package/dist/plugins/grideditor.ckeditor.min.js.map +1 -1
  18. package/dist/plugins/grideditor.inline-style.esm.js +66 -3
  19. package/dist/plugins/grideditor.inline-style.js +66 -3
  20. package/dist/plugins/grideditor.inline-style.min.js +4 -4
  21. package/dist/plugins/grideditor.inline-style.min.js.map +3 -3
  22. package/dist/plugins/grideditor.summernote.min.js.map +1 -1
  23. package/dist/plugins/grideditor.tinymce.min.js.map +1 -1
  24. package/docs/locale-keys.md +1 -0
  25. package/docs/plugins.md +7 -6
  26. package/example/adapter.html +11 -1
  27. package/example/{autocols.html → columns.html} +61 -20
  28. package/example/containers.html +13 -2
  29. package/example/{attributes.html → custom-plugins.html} +130 -12
  30. package/example/elements.html +13 -2
  31. package/example/history.html +6 -3
  32. package/example/index.html +30 -81
  33. package/example/playground.html +840 -0
  34. package/example/style.html +291 -0
  35. package/example/text-editors.html +320 -0
  36. package/package.json +1 -1
  37. package/src/js/grideditor.js +11 -1
  38. package/src/js/inline-style/accordion.js +4 -3
  39. package/src/js/inline-style/fields.js +56 -3
  40. package/src/js/inline-style/options.js +12 -0
  41. package/src/js/locales/grideditor.es.js +1 -0
  42. package/src/js/plugins/grideditor.inline-style.js +10 -0
  43. package/src/js/text/grideditor.text.js +1 -1
  44. package/src/less/grideditor.less +26 -3
  45. package/types/grideditor.d.ts +20 -0
  46. package/example/breakpoints.html +0 -100
  47. package/example/ckeditor.html +0 -110
  48. package/example/custom_editor.html +0 -212
  49. package/example/inline-style.html +0 -163
  50. package/example/plugins.html +0 -251
  51. package/example/summernote.html +0 -114
  52. package/example/utilities.html +0 -200
package/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
 
8
+ ## [9.0.0-beta.8] - 2026-10-22
9
+
10
+ ### Added
11
+ - inline-style: `inline_style.browse`, the host's file browser. With it the
12
+ background image field has a *Browse…* button that calls it with
13
+ `(done, { node, property, value })`; the url it answers - `done(url)` or a
14
+ promise - goes in as if it had been typed. Without it, the field is the text
15
+ box it was.
16
+
17
+ ### Changed
18
+ - `toolbar_overflow: 'menu'`: the more button comes right after the last add
19
+ button on the line, joined to it as one more button of its group, rather
20
+ than at the far end of the room the line had. The buttons on the right stay
21
+ at the end.
22
+
8
23
  ## [9.0.0-beta.7] - 2026-10-21
9
24
 
10
25
  ### Added
package/README.md CHANGED
@@ -24,20 +24,18 @@ from any web server, or from GitHub Pages, with no build step.
24
24
  | Demo | What it shows | |
25
25
  | --- | --- | --- |
26
26
  | [example/basic.html](example/basic.html) | The editor with tinyMCE in the content areas | [live](https://themarioga.github.io/grid-editor/example/basic.html) |
27
- | [example/breakpoints.html](example/breakpoints.html) | The six breakpoints and the "all sizes" view | [live](https://themarioga.github.io/grid-editor/example/breakpoints.html) |
28
- | [example/plugins.html](example/plugins.html) | The plugin model, with one written in the page itself | [live](https://themarioga.github.io/grid-editor/example/plugins.html) |
29
- | [example/attributes.html](example/attributes.html) | A plugin of your own: a drawer tool, a modal, and its settings saved as an attribute | [live](https://themarioga.github.io/grid-editor/example/attributes.html) |
27
+ | [example/columns.html](example/columns.html) | The six breakpoints and the "all sizes" view, equal and auto columns, columns per row, and sections | [live](https://themarioga.github.io/grid-editor/example/columns.html) |
28
+ | [example/custom-plugins.html](example/custom-plugins.html) | Plugins of your own: a container, and a drawer tool with a modal that saves an attribute | [live](https://themarioga.github.io/grid-editor/example/custom-plugins.html) |
30
29
  | [example/containers.html](example/containers.html) | Tabs, accordions, popups, offcanvases, carousels and cards, two levels deep | [live](https://themarioga.github.io/grid-editor/example/containers.html) |
31
30
  | [example/elements.html](example/elements.html) | Element level controls, including an element with no visual output | [live](https://themarioga.github.io/grid-editor/example/elements.html) |
32
- | [example/autocols.html](example/autocols.html) | Equal and auto columns, columns per row, and sections | [live](https://themarioga.github.io/grid-editor/example/autocols.html) |
33
- | [example/utilities.html](example/utilities.html) | Bootstrap's responsive utilities, edited per breakpoint | [live](https://themarioga.github.io/grid-editor/example/utilities.html) |
31
+ | [example/style.html](example/style.html) | Inline style with Bootstrap's classes as chips, and the responsive utilities, edited per breakpoint | [live](https://themarioga.github.io/grid-editor/example/style.html) |
34
32
  | [example/locale.html](example/locale.html) | The interface in Spanish, with a language switcher | [live](https://themarioga.github.io/grid-editor/example/locale.html) |
35
- | [example/ckeditor.html](example/ckeditor.html) | CKEditor instead of tinyMCE | [live](https://themarioga.github.io/grid-editor/example/ckeditor.html) |
36
- | [example/summernote.html](example/summernote.html) | Summernote instead of tinyMCE | [live](https://themarioga.github.io/grid-editor/example/summernote.html) |
33
+ | [example/text-editors.html](example/text-editors.html) | TinyMCE, CKEditor, summernote and a text editor of your own, one at a time or together | [live](https://themarioga.github.io/grid-editor/example/text-editors.html) |
37
34
  | [example/clipboard.html](example/clipboard.html) | Copy and paste, within an editor, between two, and between tabs | [live](https://themarioga.github.io/grid-editor/example/clipboard.html) |
38
35
  | [example/wrap_content.html](example/wrap_content.html) | Non-bootstrap markup wrapped into the grid | [live](https://themarioga.github.io/grid-editor/example/wrap_content.html) |
39
36
  | [example/history.html](example/history.html) | The history plugin: undo and redo, with the keyboard and the toolbar | [live](https://themarioga.github.io/grid-editor/example/history.html) |
40
37
  | [example/autosave.html](example/autosave.html) | The autosave plugin: drafts kept as the user edits, offered back after a reload; import and export | [live](https://themarioga.github.io/grid-editor/example/autosave.html) |
38
+ | [example/playground.html](example/playground.html) | Every plugin on one canvas, with settings to turn things on and off and the options as code | [live](https://themarioga.github.io/grid-editor/example/playground.html) |
41
39
  | [example/adapter.html](example/adapter.html) | A page written for 6.x, with jQuery, running unchanged through the adapter | [live](https://themarioga.github.io/grid-editor/example/adapter.html) |
42
40
 
43
41
  [example/angular](example/angular) is the editor in an Angular app, from the npm
@@ -490,7 +488,7 @@ __`settings_panel`:__ Where the settings a gear opens are shown - a node's id, i
490
488
  | `'inline'` | Unfolded in the drawer itself |
491
489
  | `'sidebar'` | An offcanvas that stays on the right while you edit, and makes room for itself on the page. A click on any node of the canvas shows its settings, and there is no gear. It turns `active_target` on, so the node clicked is the target, and also where the toolbar adds; `active_target: false` with it is an error |
492
490
 
493
- Each is titled after its node ("Column settings"), the node is outlined while its settings are open, and Escape closes them. The editor opens and places them itself, with Bootstrap's markup and css: a page needs neither Popper nor Bootstrap's javascript, and the modal is Bootstrap's own when Bootstrap is there. [example/utilities.html](example/utilities.html) switches between the four.
491
+ Each is titled after its node ("Column settings"), the node is outlined while its settings are open, and Escape closes them. The editor opens and places them itself, with Bootstrap's markup and css: a page needs neither Popper nor Bootstrap's javascript, and the modal is Bootstrap's own when Bootstrap is there. [example/style.html](example/style.html) switches between them.
494
492
 
495
493
  ```javascript
496
494
  new GridEditor('#myGrid', { settings_panel: 'popover' });
@@ -720,10 +718,26 @@ new GridEditor('#myGrid', {
720
718
  },
721
719
  spacing: { values: ['0', '2', '4'], scale: [/* if you changed $spacers */] },
722
720
  visibility: { drawer: false }, // no eye in the drawers, the display field only
721
+ browse: function(done, context) { // a button beside the background image opens your file browser
722
+ myBrowser.open(function(url) { done(url); });
723
+ },
723
724
  },
724
725
  });
725
726
  ```
726
727
 
728
+ `browse` is your file browser, for the fields that take a url - the background
729
+ image. Without it they are a text box; with it, a button beside the box calls
730
+ `browse(done, { node, property, value })`, where `value` is what the field
731
+ shows. Answer with `done(url)`, or return a promise of the url: the first
732
+ answer counts. `done()`, `null`, an empty text and a promise that never
733
+ answers leave the field as it was, and the url goes in as if it had been
734
+ typed. An answer after the node left the canvas, or the editor was
735
+ destroyed, is ignored. The editor does nothing for the browser's own window:
736
+ a Bootstrap modal, a popup window or a `<input type="file">` work over an
737
+ open panel, but a dialog written in the page that is not a Bootstrap modal
738
+ can lose the focus to the panel's, and with `active_target` a click in it
739
+ puts the selection away - in the sidebar, empties it.
740
+
727
741
  The sections are `size`, `spacing`, `border`, `background`, `text`,
728
742
  `typography`, `display`, `flex`, `position` and `custom`. `properties` chooses and
729
743
  orders a section's inline fields; the per breakpoint ones stay while the
@@ -737,7 +751,7 @@ A node that is flex or grid in the view you are in - a column with `d-flex`,
737
751
  a row with `flex-nowrap` - has its drawer on top, out of the flow, so the
738
752
  canvas lays out its content as the page will.
739
753
 
740
- See [example/inline-style.html](example/inline-style.html).
754
+ See [example/style.html](example/style.html).
741
755
 
742
756
  ### Responsive utilities
743
757
 
@@ -782,7 +796,7 @@ new GridEditor('#myGrid', {
782
796
  });
783
797
  ```
784
798
 
785
- See [example/utilities.html](example/utilities.html), and
799
+ See [example/style.html](example/style.html), and
786
800
  [docs/plugins.md](docs/plugins.md#utility-plugins) for writing one.
787
801
 
788
802
  ### Sections
@@ -1188,15 +1202,15 @@ same way, `codemirror.config` included, and a textarea without it.
1188
1202
 
1189
1203
  Grid editor comes with support for the following rich text editors (RTEs), each a plugin of its own to load after the editor:
1190
1204
  * [TinyMCE](http://www.tinymce.com/) 7 - `dist/plugins/grideditor.tinymce.min.js` - [(example)](example/basic.html)
1191
- * [summernote](http://summernote.org/) 0.9 - `dist/plugins/grideditor.summernote.min.js` - [(example)](example/summernote.html)
1192
- * [CKEditor](http://ckeditor.com/) 5 - `dist/plugins/grideditor.ckeditor.min.js` - [(example)](example/ckeditor.html)
1205
+ * [summernote](http://summernote.org/) 0.9 - `dist/plugins/grideditor.summernote.min.js` - [(example)](example/text-editors.html?editor=summernote)
1206
+ * [CKEditor](http://ckeditor.com/) 5 - `dist/plugins/grideditor.ckeditor.min.js` - [(example)](example/text-editors.html?editor=ckeditor)
1193
1207
 
1194
1208
  A text editor is chosen by `content_types`, not by the `plugins` setting: a page
1195
1209
  that names its containers in `plugins` still has its editor. Summernote 0.9.1
1196
1210
  calls `$.now()`, which jQuery 4 removed; its plugin gives it back, and only if
1197
1211
  it is missing. Another editor is a plugin of your own:
1198
1212
  [docs/plugins.md](docs/plugins.md#text) says how, and
1199
- [example/custom_editor.html](example/custom_editor.html) is one.
1213
+ [example/text-editors.html](example/text-editors.html?editor=simpletext) is one.
1200
1214
 
1201
1215
  __`content_types`:__ Specify the RTEs to offer, in order. Valid values: any of `'tinymce'`, `'summernote'`, `'ckeditor'` whose plugin is loaded. Default value: every text editor loaded, in the order the page loaded them.
1202
1216
 
@@ -1208,7 +1222,7 @@ new GridEditor('#myGrid', {
1208
1222
 
1209
1223
  __`ckeditor.config`:__ Specify CKEditor 5 config, when using the `ckeditor` `content_types`:
1210
1224
  anything `InlineEditor.create` takes. See the [CKEditor documentation](https://ckeditor.com/docs/ckeditor5/latest/).
1211
- Also check out the [ckeditor example](example/ckeditor.html).
1225
+ Also check out the [ckeditor example](example/text-editors.html?editor=ckeditor).
1212
1226
 
1213
1227
  Load CKEditor 5's browser build, which puts it on the page as `window.CKEDITOR`:
1214
1228
 
@@ -1246,7 +1260,7 @@ new GridEditor('#myGrid', {
1246
1260
 
1247
1261
  __`summernote.config`:__ Specify summernote config, when using the `summernote` `content_types`.
1248
1262
  See the [summernote documentation](http://summernote.org/deep-dive/).
1249
- Also check out the [summernote example](example/summernote.html).
1263
+ Also check out the [summernote example](example/text-editors.html?editor=summernote).
1250
1264
 
1251
1265
  ```javascript
1252
1266
  new GridEditor('#myGrid', {
package/UPGRADING.md CHANGED
@@ -388,7 +388,7 @@ same from it.
388
388
  that loads none of the shipped editors: `texts` is their own registry. An
389
389
  editor of your own is a feature plugin that declares its type with
390
390
  `textTypes`; [docs/plugins.md](docs/plugins.md#text) has the contract, and
391
- [example/custom_editor.html](example/custom_editor.html) is one in full.
391
+ [example/text-editors.html](example/text-editors.html?editor=simpletext) has one in full.
392
392
 
393
393
  * __No *Add text* tool in the columns' drawers.__ 5.3 put one there; a text
394
394
  is added with the toolbar's *Text* button, dragged into the column, or