@themarioga/grid-editor 7.1.0 → 7.3.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 (76) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/README.md +117 -19
  3. package/UPGRADING.md +72 -0
  4. package/dist/grideditor.bundle.min.js +3 -3
  5. package/dist/grideditor.css +102 -0
  6. package/dist/grideditor.d.ts +18 -0
  7. package/dist/grideditor.esm.js +292 -32
  8. package/dist/grideditor.js +292 -32
  9. package/dist/grideditor.min.css +1 -1
  10. package/dist/grideditor.min.css.map +1 -1
  11. package/dist/grideditor.min.js +2 -2
  12. package/dist/grideditor.min.js.map +3 -3
  13. package/dist/locales/grideditor.es.esm.js +70 -1
  14. package/dist/locales/grideditor.es.js +70 -1
  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.esm.js +123 -48
  18. package/dist/plugins/grideditor.ckeditor.js +123 -48
  19. package/dist/plugins/grideditor.ckeditor.min.js +1 -1
  20. package/dist/plugins/grideditor.ckeditor.min.js.map +3 -3
  21. package/dist/plugins/grideditor.float.esm.js +10 -1
  22. package/dist/plugins/grideditor.float.js +8 -2
  23. package/dist/plugins/grideditor.float.min.js +1 -1
  24. package/dist/plugins/grideditor.float.min.js.map +4 -4
  25. package/dist/plugins/grideditor.spacing.esm.js +12 -3
  26. package/dist/plugins/grideditor.spacing.js +9 -3
  27. package/dist/plugins/grideditor.spacing.min.js +1 -1
  28. package/dist/plugins/grideditor.spacing.min.js.map +4 -4
  29. package/dist/plugins/grideditor.style.esm.js +1593 -0
  30. package/dist/plugins/grideditor.style.js +1592 -0
  31. package/dist/plugins/grideditor.style.min.js +2 -0
  32. package/dist/plugins/grideditor.style.min.js.map +7 -0
  33. package/dist/plugins/grideditor.summernote.esm.js +1 -1
  34. package/dist/plugins/grideditor.summernote.js +1 -1
  35. package/dist/plugins/grideditor.summernote.min.js +1 -1
  36. package/dist/plugins/grideditor.summernote.min.js.map +2 -2
  37. package/dist/plugins/grideditor.textalign.esm.js +10 -1
  38. package/dist/plugins/grideditor.textalign.js +8 -2
  39. package/dist/plugins/grideditor.textalign.min.js +1 -1
  40. package/dist/plugins/grideditor.textalign.min.js.map +4 -4
  41. package/dist/plugins/grideditor.tinymce.esm.js +1 -1
  42. package/dist/plugins/grideditor.tinymce.js +1 -1
  43. package/dist/plugins/grideditor.tinymce.min.js +1 -1
  44. package/dist/plugins/grideditor.tinymce.min.js.map +2 -2
  45. package/dist/plugins/grideditor.visibility.esm.js +12 -3
  46. package/dist/plugins/grideditor.visibility.js +9 -3
  47. package/dist/plugins/grideditor.visibility.min.js +1 -1
  48. package/dist/plugins/grideditor.visibility.min.js.map +4 -4
  49. package/docs/locale-keys.md +89 -8
  50. package/docs/plugins.md +49 -5
  51. package/example/ckeditor.html +9 -4
  52. package/example/index.html +15 -1
  53. package/example/style.html +151 -0
  54. package/example/utilities.html +15 -11
  55. package/package.json +1 -1
  56. package/src/js/grideditor.js +366 -28
  57. package/src/js/locales/grideditor.es.js +70 -1
  58. package/src/js/plugins/grideditor.ckeditor.js +129 -65
  59. package/src/js/plugins/grideditor.float.js +8 -33
  60. package/src/js/plugins/grideditor.spacing.js +8 -273
  61. package/src/js/plugins/grideditor.style.js +179 -0
  62. package/src/js/plugins/grideditor.textalign.js +8 -39
  63. package/src/js/plugins/grideditor.visibility.js +8 -147
  64. package/src/js/style/accordion.js +157 -0
  65. package/src/js/style/catalog.js +76 -0
  66. package/src/js/style/custom.js +84 -0
  67. package/src/js/style/fields.js +382 -0
  68. package/src/js/style/float.js +46 -0
  69. package/src/js/style/options.js +75 -0
  70. package/src/js/style/sections.js +271 -0
  71. package/src/js/style/spacing.js +286 -0
  72. package/src/js/style/textalign.js +52 -0
  73. package/src/js/style/visibility.js +160 -0
  74. package/src/js/text/grideditor.text.js +1 -1
  75. package/src/less/grideditor.less +111 -0
  76. package/types/grideditor.d.ts +18 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,69 @@ 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
+ ## [7.3.0] - 2026-09-29
9
+
10
+ ### Added
11
+ - The style plugin, `grideditor.style.js`. Every row, column, container,
12
+ pane, element and section gets a *Style* accordion in its settings panel:
13
+ size, spacing, border, background, text, typography, display, position
14
+ and free css. It is written to the node's own `style` through the
15
+ browser, so a value the browser refuses is marked and not written, and
16
+ what the host wrote and nobody edits is kept. Each section offers
17
+ Bootstrap 5.3's classes for what it styles as chips, which put a class in
18
+ the classes field or take it off. A field whose property a Bootstrap
19
+ utility on the node also sets says that the class takes priority. Where
20
+ `settings_panel` is `popover` or `inline` the accordion opens in a
21
+ dialog, from a *Style* button. The `style` setting chooses the sections,
22
+ and in each the properties and whether it has chips. See the README and
23
+ [example/style.html](example/style.html).
24
+ - The style plugin carries spacing, text alignment, visibility and float:
25
+ their per breakpoint fields are in its Spacing, Text, Display and
26
+ Position sections rather than in *Responsive*, and do what they did.
27
+ `style.spacing` and `style.visibility` take what `utilities.spacing` and
28
+ `utilities.visibility` took.
29
+ - For plugins: `panelSection(node, kind)`, a section of a plugin's own in a
30
+ node's settings panel, between its general fields and *Responsive*;
31
+ `ge.openDialog`/`ge.closeDialog`, a modal of the editor's own over the
32
+ settings; `ge.hostStyle`/`ge.setHostStyle`, the host's own style under a
33
+ breakpoint preview; and `replaces` on a factory, for a plugin that takes
34
+ the place of others. A field made with `ge.utilityField` follows the view
35
+ and the classes field wherever the plugin puts it. See
36
+ [docs/plugins.md](docs/plugins.md).
37
+
38
+ ### Deprecated
39
+ - `grideditor.spacing.js`, `grideditor.textalign.js`,
40
+ `grideditor.visibility.js` and `grideditor.float.js`, which go in 8.0.
41
+ Loaded on their own they do what they did, and say once per editor that
42
+ they are deprecated; loaded beside the style plugin they stand down, and
43
+ their names in the `plugins` setting ask for it. `utilities.spacing` and
44
+ `utilities.visibility` are still read, when `style.spacing` and
45
+ `style.visibility` are not there, and go in 8.0 too. See
46
+ [UPGRADING.md](UPGRADING.md).
47
+
48
+
49
+ ## [7.2.0] - 2026-09-29
50
+
51
+ ### Changed
52
+ - **BREAKING:** The CKEditor integration is CKEditor 5, and the example and
53
+ the tests use CKEditor 48.5.2, the latest release and one with no known
54
+ advisories. CKEditor 4.22.1 has five (GHSA-fq6h-4g8v-qqvm,
55
+ GHSA-6v96-m24v-f58j, GHSA-7r32-vfj5-c2jv, GHSA-wh5w-82f3-wrxh,
56
+ GHSA-mw2c-vx6j-mg76), and every CKEditor 4 with them fixed is commercial.
57
+ CKEditor 5 is GPL-2.0-or-later, and does not start without a `licenseKey`
58
+ in `ckeditor.config`: `'GPL'`, or a commercial key. `ckeditor.config` is
59
+ CKEditor 5's; the plugin gives it plugins, a toolbar and h1 to h6 headings
60
+ when the config has none, and still calls `on.instanceReady`. The content
61
+ type is still `ckeditor`, so saved markup loads as it is, and the `ck-*`
62
+ classes CKEditor 5 puts on a content area stay out of it. See
63
+ [UPGRADING.md](UPGRADING.md).
64
+
65
+ ### Added
66
+ - `error.ckeditor_start`, logged when CKEditor 5 cannot start, and
67
+ `warning.ckeditor_plugin`, for a plugin name the config gives that CKEditor
68
+ does not have.
69
+
70
+
8
71
  ## [7.1.0] - 2026-09-29
9
72
 
10
73
  ### Changed
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Grid Editor
2
2
  ===========
3
3
 
4
- Grid Editor is a visual javascript editor for the [bootstrap 5 grid system](https://getbootstrap.com/docs/5.3/layout/grid/), in plain DOM: no jQuery needed. You can create, drag, resize and delete rows and columns — sized in units, equal (`col`) or to their content (`col-auto`), or shared out by their row (`row-cols-*`) — indent them, group them in sections (`.container`), copy and paste them, and give each of bootstrap's six breakpoints its own layout — or edit them all at once, with a mouse or with a finger. Bootstrap's responsive utilities — visibility, order, alignment, gutters, spacing, text alignment and float — are edited per breakpoint too. It also edits tabs, accordions, popups and cards, and any markup you mark as an element, and it tells your application about every change it makes.
4
+ Grid Editor is a visual javascript editor for the [bootstrap 5 grid system](https://getbootstrap.com/docs/5.3/layout/grid/), in plain DOM: no jQuery needed. You can create, drag, resize and delete rows and columns — sized in units, equal (`col`) or to their content (`col-auto`), or shared out by their row (`row-cols-*`) — indent them, group them in sections (`.container`), copy and paste them, and give each of bootstrap's six breakpoints its own layout — or edit them all at once, with a mouse or with a finger. Bootstrap's responsive utilities — visibility, order, alignment, gutters, spacing, text alignment and float — are edited per breakpoint too, and any row, column, container or element can be given inline css, with Bootstrap's classes for it offered as chips. It also edits tabs, accordions, popups and cards, and any markup you mark as an element, and it tells your application about every change it makes.
5
5
 
6
6
  This is a fork of [Friendly-Pixel/grid-editor](https://github.com/Friendly-Pixel/grid-editor)
7
7
  by Simon Epskamp, carrying it on from 2.x. It is published as
@@ -48,7 +48,7 @@ Installation
48
48
  * __Dependencies:__ Grid Editor depends on [SortableJS](https://sortablejs.github.io/Sortable/), Bootstrap Icons, and Bootstrap 5, so make sure you have included those in the page. It does not need jQuery since 7.0.
49
49
  * If you want to use the tinyMCE integration, include tinyMCE 7 (7.9.3 or later) as well, and `dist/plugins/grideditor.tinymce.min.js` after the editor.
50
50
  * If you want to use the summernote integration, include summernote and `dist/plugins/grideditor.summernote.min.js`. Summernote needs jQuery itself, so that page loads jQuery too; nothing else does.
51
- * If you want to use the CKEditor integration... you get the point: CKEditor and `dist/plugins/grideditor.ckeditor.min.js`.
51
+ * If you want to use the CKEditor integration... you get the point: CKEditor 5's browser build (`ckeditor5.umd.js` and `ckeditor5.css`) and `dist/plugins/grideditor.ckeditor.min.js`. CKEditor 4 is no longer supported.
52
52
  * Up to 5.x the main bundle carried a copy of the three; since 6.0 the plugin of the editor you use has to be loaded, as above. See [UPGRADING.md](UPGRADING.md).
53
53
  * From npm:
54
54
 
@@ -560,33 +560,98 @@ __`element_tools`:__ Extra tools on every element drawer, same shape as `row_too
560
560
  See [example/elements.html](example/elements.html), which also shows the
561
561
  pattern for an element with no visual output of its own.
562
562
 
563
+ ### Style
564
+
565
+ Inline css for rows, columns, containers, panes, elements and sections, and
566
+ Bootstrap's classes for it. A plugin:
567
+
568
+ ```html
569
+ <script src="grid-editor/dist/plugins/grideditor.style.min.js"></script> <!-- after grideditor.elements -->
570
+ ```
571
+
572
+ Each of those nodes gets a *Style* accordion in its settings panel, between
573
+ its id and classes and the *Responsive* section. One section is open at a
574
+ time, and the one you opened last is open on the next node too.
575
+
576
+ | Section | Inline fields | Per breakpoint |
577
+ | --- | --- | --- |
578
+ | Size | `width`, `height`, `min-*` and `max-*` (a column: `min-*` and `max-*` only, its width is the grid's) | |
579
+ | Spacing | `margin-*` and `padding-*`, by side | padding and margin, `{p,m}{,x,y,t,b,s,e}-{bp}-{0–5}` |
580
+ | Border | width, style, color, radius, and a shadow builder | |
581
+ | Background | color, image, size, position, repeat | |
582
+ | Text | color, size, alignment, and a text shadow builder | `text-{bp}-start`, `-center`, `-end` |
583
+ | Typography | family, weight, style, line height, letter spacing, transform, decoration | |
584
+ | Display | display, opacity, overflow, visibility | visibility, `d-{bp}-none` / `-block` / `-flex`, with the eye in the drawer |
585
+ | Position | position, `top`, `right`, `bottom`, `left` (not on a column), `z-index` | float, `float-{bp}-*`, on an element |
586
+ | Custom css | whatever no field stands for, as text | |
587
+
588
+ What you type goes to the node's own `style`, through the browser: a value it
589
+ does not take is marked and not written, and whatever the host wrote that you
590
+ do not edit is kept, `!important` included. The style attribute is the same at
591
+ every size, and in a breakpoint view the accordion says so; the per breakpoint
592
+ fields are Bootstrap's responsive classes, and edit the view you are in.
593
+ A text gets only Text and Display, with their per breakpoint fields: its
594
+ editor owns what is inside it.
595
+
596
+ Every section but Spacing and Custom css also offers Bootstrap's classes for
597
+ what it styles - `rounded-3`, `shadow-sm`, `bg-primary`, `fs-4`, `fw-bold`,
598
+ `opacity-50`, `position-relative`… - as chips. A chip puts its class in the
599
+ classes field, and pressing it again takes it off; chips that are
600
+ alternatives, like `rounded-2` and `rounded-pill`, take each other off.
601
+ Bootstrap's utilities are `!important`, so a field whose property a class on
602
+ the node also sets says which class takes priority.
603
+
604
+ With `settings_panel: 'popover'` or `'inline'` the panel has a *Style* button
605
+ instead, which opens the accordion in a dialog.
606
+
607
+ __`style`:__ Every section, unless you say otherwise.
608
+
609
+ ```javascript
610
+ new GridEditor('#myGrid', {
611
+ style: {
612
+ sections: {
613
+ position: false, // no Position section
614
+ border: { properties: ['border-width', 'border-color'], catalog: false }, // two fields, no chips
615
+ },
616
+ spacing: { values: ['0', '2', '4'], scale: [/* if you changed $spacers */] },
617
+ visibility: { drawer: false }, // no eye in the drawers, the field only
618
+ },
619
+ });
620
+ ```
621
+
622
+ The sections are `size`, `spacing`, `border`, `background`, `text`,
623
+ `typography`, `display`, `position` and `custom`. `properties` chooses and
624
+ orders a section's inline fields; the per breakpoint ones stay while the
625
+ section does. What a section you left out or narrowed would have shown is in
626
+ Custom css.
627
+
628
+ Sanitizing what `getHtml` returns is the page's business, style attributes
629
+ included.
630
+
631
+ See [example/style.html](example/style.html).
632
+
563
633
  ### Responsive utilities
564
634
 
565
- Bootstrap's responsive utility classes, edited per breakpoint. Each family is
566
- a plugin in a file of its own:
635
+ Bootstrap's responsive utility classes, edited per breakpoint. The grid's are
636
+ plugins of their own; the ones that style a node are the style plugin's, above.
567
637
 
568
638
  ```html
569
- <script src="grid-editor/dist/plugins/grideditor.visibility.min.js"></script>
570
639
  <script src="grid-editor/dist/plugins/grideditor.order.min.js"></script>
571
640
  <script src="grid-editor/dist/plugins/grideditor.alignment.min.js"></script>
572
641
  <script src="grid-editor/dist/plugins/grideditor.gutters.min.js"></script>
573
- <script src="grid-editor/dist/plugins/grideditor.spacing.min.js"></script>
574
- <script src="grid-editor/dist/plugins/grideditor.textalign.min.js"></script>
575
- <script src="grid-editor/dist/plugins/grideditor.float.min.js"></script> <!-- after grideditor.elements -->
642
+ <script src="grid-editor/dist/plugins/grideditor.style.min.js"></script>
576
643
  ```
577
644
 
578
645
  | Plugin | Classes | On |
579
646
  | --- | --- | --- |
580
- | `visibility` | `d-{bp}-none`, `d-{bp}-block`, `d-{bp}-flex` | rows, columns, elements, containers |
581
647
  | `order` | `order-{bp}-{first,0–5,last}` | columns |
582
648
  | `alignment` | `justify-content-{bp}-*`, `align-items-{bp}-*`; `align-self-{bp}-*` | rows; columns |
583
649
  | `gutters` | `g-{bp}-{0–5}`, `gx-{bp}-*`, `gy-{bp}-*` | rows |
584
- | `spacing` | `{p,m}{,x,y,t,b,s,e}-{bp}-{0–5}`, and `auto` for margin | rows, columns, elements, containers |
585
- | `textalign` | `text-{bp}-start`, `-center`, `-end` | rows, columns, elements, containers |
586
- | `float` | `float-{bp}-start`, `-end`, `-none` | elements |
650
+ | `style` | visibility, spacing, text alignment and float; see [Style](#style) | rows, columns, elements, containers, texts |
587
651
 
588
652
  A plugin puts a field in the *Responsive* section of each drawer's settings
589
- panel, and some add a tool to the drawer. In a breakpoint view a change is
653
+ panel - or, for the style plugin, in its section of the *Style* accordion -
654
+ and some add a tool to the drawer. In a breakpoint view a change is
590
655
  written for that breakpoint alone, and the field says what it inherits and from
591
656
  where. In the all view it is written once, as the class with no breakpoint, and
592
657
  replaces what the breakpoints said. While you edit, the canvas shows what the
@@ -602,14 +667,18 @@ __`utilities`:__ Options for each plugin, under its name.
602
667
  ```javascript
603
668
  new GridEditor('#myGrid', {
604
669
  utilities: {
605
- visibility: { drawer: false }, // no eye in the drawers, the field only
606
670
  order: { drawer: false }, // no arrows in the column drawers
607
671
  gutters: { scale: ['0', '.25rem', '.5rem', '1rem', '1.5rem', '3rem'] }, // if you changed $spacers
608
- spacing: { values: ['0', '2', '4'], scale: [/* the same */] }, // offer fewer steps
609
672
  },
610
673
  });
611
674
  ```
612
675
 
676
+ Up to 7.2 visibility, spacing, text alignment and float were plugins of
677
+ their own, `grideditor.visibility.js`, `grideditor.spacing.js`,
678
+ `grideditor.textalign.js` and `grideditor.float.js`, with their options in
679
+ `utilities.visibility` and `utilities.spacing`. In 7.3 those files still work
680
+ on their own, deprecated, and go in 8.0; see [UPGRADING.md](UPGRADING.md).
681
+
613
682
  See [example/utilities.html](example/utilities.html), and
614
683
  [docs/plugins.md](docs/plugins.md#utility-plugins) for writing one.
615
684
 
@@ -825,7 +894,7 @@ same way, `codemirror.config` included, and a textarea without it.
825
894
  Grid editor comes with support for the following rich text editors (RTEs), each a plugin of its own to load after the editor:
826
895
  * [TinyMCE](http://www.tinymce.com/) 7 - `dist/plugins/grideditor.tinymce.min.js` - [(example)](example/basic.html)
827
896
  * [summernote](http://summernote.org/) 0.9 - `dist/plugins/grideditor.summernote.min.js` - [(example)](example/summernote.html)
828
- * [CKEditor](http://ckeditor.com/) 4 - `dist/plugins/grideditor.ckeditor.min.js` - [(example)](example/ckeditor.html)
897
+ * [CKEditor](http://ckeditor.com/) 5 - `dist/plugins/grideditor.ckeditor.min.js` - [(example)](example/ckeditor.html)
829
898
 
830
899
  A text editor is chosen by `content_types`, not by the `plugins` setting: a page
831
900
  that names its containers in `plugins` still has its editor. Summernote 0.9.1
@@ -842,18 +911,47 @@ new GridEditor('#myGrid', {
842
911
  });
843
912
  ```
844
913
 
845
- __`ckeditor.config`:__ Specify ckeditor config, when using the `ckeditor` `content_types`.
846
- See the [CKEditor documentation](http://docs.ckeditor.com/).
914
+ __`ckeditor.config`:__ Specify CKEditor 5 config, when using the `ckeditor` `content_types`:
915
+ anything `InlineEditor.create` takes. See the [CKEditor documentation](https://ckeditor.com/docs/ckeditor5/latest/).
847
916
  Also check out the [ckeditor example](example/ckeditor.html).
848
917
 
918
+ Load CKEditor 5's browser build, which puts it on the page as `window.CKEDITOR`:
919
+
920
+ ```html
921
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ckeditor5@48.5.2/dist/browser/ckeditor5.css">
922
+ <script src="https://cdn.jsdelivr.net/npm/ckeditor5@48.5.2/dist/browser/ckeditor5.umd.js"></script>
923
+ ```
924
+
925
+ CKEditor 5 does not start without a `licenseKey`: pass `'GPL'` to accept its
926
+ GPL-2.0-or-later licence, or your own key if you have a commercial licence.
927
+ Grid editor does not pass one for you, since the licence is yours to choose,
928
+ and logs `CKEditor could not start: license-key-missing` when there is none.
929
+ CKEditor's cloud CDN is for commercial keys: with `'GPL'`, load it from npm,
930
+ as above, or host it yourself.
931
+
932
+ CKEditor 5 has no plugins of its own, so grid editor gives it a set - the basic
933
+ styles, headings h1 to h6, links, lists, block quotes, tables and horizontal
934
+ lines - and a toolbar for them. `plugins` and `toolbar` in your config replace
935
+ those; a plugin can be given by its name on `window.CKEDITOR`. Markup that no
936
+ loaded plugin knows is dropped as the editor opens, a class included: add
937
+ `'GeneralHtmlSupport'` and its `htmlSupport` option to keep it.
938
+
849
939
  ```javascript
850
940
  new GridEditor('#myGrid', {
851
941
  ckeditor: {
852
- config: { language: 'fr' }
942
+ config: {
943
+ licenseKey: 'GPL',
944
+ plugins: ['Essentials', 'Paragraph', 'Heading', 'Bold', 'Italic', 'Link', 'GeneralHtmlSupport'],
945
+ toolbar: ['heading', 'bold', 'italic', 'link'],
946
+ htmlSupport: { allow: [{ name: /^(p|h[1-6]|a|strong|i)$/, classes: true }] },
947
+ }
853
948
  }
854
949
  });
855
950
  ```
856
951
 
952
+ `config.on.instanceReady`, CKEditor 4's, is still called once the editor is
953
+ ready, with the editor as `this` and as `evt.editor`.
954
+
857
955
  __`summernote.config`:__ Specify summernote config, when using the `summernote` `content_types`.
858
956
  See the [summernote documentation](http://summernote.org/deep-dive/).
859
957
  Also check out the [summernote example](example/summernote.html).
package/UPGRADING.md CHANGED
@@ -1,3 +1,75 @@
1
+ Upgrading from grid-editor `7.2` to `7.3`
2
+ =========================================
3
+
4
+ Nothing breaks. The spacing, textalign, visibility and float plugins are now
5
+ part of the **style plugin**, and deprecated on their own: they go in 8.0.
6
+ A page that loads them keeps working as it did, with a warning in the
7
+ console.
8
+
9
+ * __Load the style plugin instead of the four.__ It edits the same classes
10
+ per breakpoint, in its Spacing, Text, Display and Position sections rather
11
+ than in *Responsive*, and adds inline css and Bootstrap's classes as
12
+ chips.
13
+
14
+ ```html
15
+ <script src="dist/plugins/grideditor.style.min.js"></script>
16
+ ```
17
+
18
+ As a module, `import '@themarioga/grid-editor/plugins/style'`. Loaded
19
+ beside it, the old files stand down.
20
+ * __Name it in the `plugins` setting__, if the page names its plugins:
21
+ `plugins: ['style', …]` instead of `'spacing'`, `'textalign'`,
22
+ `'visibility'` or `'float'`. An old name still asks for the style plugin,
23
+ with a warning, until 8.0.
24
+ * __Move the options.__ `utilities: { spacing: … }` is
25
+ `style: { spacing: … }`, and `utilities: { visibility: … }` is
26
+ `style: { visibility: … }`. The old ones are still read, with a warning,
27
+ until 8.0.
28
+ * __Tests or code that look for the fields__ in the Responsive section find
29
+ them in the Style accordion now: `[data-ge-style-section="spacing"]` and
30
+ the others.
31
+
32
+ Upgrading from grid-editor `7.1` to `7.2`
33
+ =========================================
34
+
35
+ Only for a page that uses the CKEditor plugin: **the CKEditor integration is
36
+ CKEditor 5**. It breaks such a page, and it is a minor all the same, because
37
+ it is a change in a plugin, not in the core.
38
+
39
+ CKEditor 4.22.1, the last open source CKEditor 4, has known cross-site
40
+ scripting vulnerabilities and gets no more fixes; every CKEditor 4 after it is
41
+ commercial. A page that does not use CKEditor has nothing to change. Markup
42
+ saved with a CKEditor text loads as it is: the content type is still
43
+ `ckeditor`.
44
+
45
+ * __Load CKEditor 5 instead of CKEditor 4.__ Its browser build, and its
46
+ stylesheet:
47
+
48
+ ```html
49
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ckeditor5@48.5.2/dist/browser/ckeditor5.css">
50
+ <script src="https://cdn.jsdelivr.net/npm/ckeditor5@48.5.2/dist/browser/ckeditor5.umd.js"></script>
51
+ ```
52
+
53
+ With CKEditor 4 on the page, the plugin says CKEditor 5 is not available.
54
+ * __Pass a `licenseKey`.__ CKEditor 5 does not start without one: `'GPL'`
55
+ accepts its GPL-2.0-or-later licence, or pass your commercial key.
56
+
57
+ ```javascript
58
+ new GridEditor('#myGrid', {
59
+ content_types: ['ckeditor'],
60
+ ckeditor: { config: { licenseKey: 'GPL' } },
61
+ });
62
+ ```
63
+ * __Rewrite the rest of `ckeditor.config` for CKEditor 5.__ It is what
64
+ `InlineEditor.create` takes, and CKEditor 4's options mean nothing to it:
65
+ `toolbar` has another shape, `extraPlugins`, `removePlugins` and
66
+ `allowedContent` are gone, and `plugins` lists every plugin. grid-editor
67
+ gives it a set of plugins and a toolbar when the config has none; see the
68
+ README. `on.instanceReady` is still called, with the editor as `this` and
69
+ as `evt.editor`.
70
+ * __Markup no plugin knows is dropped__ as the editor opens, as CKEditor 4's
71
+ content filter did: add `GeneralHtmlSupport` to keep classes and elements.
72
+
1
73
  Upgrading from grid-editor `6.*` to `7.*`
2
74
  =========================================
3
75