@themarioga/grid-editor 7.3.0 → 8.0.0-beta.3
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.
- package/CHANGELOG.md +76 -0
- package/README.md +34 -30
- package/UPGRADING.md +55 -0
- package/dist/grideditor.bundle.min.js +3 -3
- package/dist/grideditor.css +72 -6
- package/dist/grideditor.d.ts +24 -3
- package/dist/grideditor.esm.js +7 -58
- package/dist/grideditor.jquery.js +0 -13
- package/dist/grideditor.jquery.min.js +1 -1
- package/dist/grideditor.jquery.min.js.map +3 -3
- package/dist/grideditor.js +7 -58
- package/dist/grideditor.min.css +1 -1
- package/dist/grideditor.min.css.map +1 -1
- package/dist/grideditor.min.js +2 -2
- package/dist/grideditor.min.js.map +3 -3
- package/dist/locales/grideditor.es.esm.js +30 -6
- package/dist/locales/grideditor.es.js +30 -6
- package/dist/locales/grideditor.es.min.js +1 -1
- package/dist/locales/grideditor.es.min.js.map +2 -2
- package/dist/plugins/grideditor.accordion.min.js.map +2 -2
- package/dist/plugins/grideditor.alignment.esm.js +11 -38
- package/dist/plugins/grideditor.alignment.js +11 -38
- package/dist/plugins/grideditor.alignment.min.js +1 -1
- package/dist/plugins/grideditor.alignment.min.js.map +3 -3
- package/dist/plugins/grideditor.card.min.js.map +1 -1
- package/dist/plugins/grideditor.ckeditor.esm.js +0 -5
- package/dist/plugins/grideditor.ckeditor.js +0 -5
- package/dist/plugins/grideditor.ckeditor.min.js +1 -1
- package/dist/plugins/grideditor.ckeditor.min.js.map +3 -3
- package/dist/plugins/grideditor.clipboard.min.js.map +1 -1
- package/dist/plugins/grideditor.codemirror-inline.min.js.map +1 -1
- package/dist/plugins/grideditor.codemirror.min.js.map +1 -1
- package/dist/plugins/grideditor.elements.min.js.map +2 -2
- package/dist/plugins/grideditor.gutters.min.js.map +1 -1
- package/dist/plugins/grideditor.order.min.js.map +1 -1
- package/dist/plugins/grideditor.popup.min.js.map +1 -1
- package/dist/plugins/grideditor.sections.min.js.map +2 -2
- package/dist/plugins/grideditor.style.esm.js +393 -60
- package/dist/plugins/grideditor.style.js +387 -56
- package/dist/plugins/grideditor.style.min.js +4 -2
- package/dist/plugins/grideditor.style.min.js.map +4 -4
- package/dist/plugins/grideditor.summernote.min.js.map +2 -2
- package/dist/plugins/grideditor.tabs.esm.js +274 -6
- package/dist/plugins/grideditor.tabs.js +274 -6
- package/dist/plugins/grideditor.tabs.min.js +1 -1
- package/dist/plugins/grideditor.tabs.min.js.map +3 -3
- package/dist/plugins/grideditor.tinymce.esm.js +1 -8
- package/dist/plugins/grideditor.tinymce.js +1 -8
- package/dist/plugins/grideditor.tinymce.min.js +1 -1
- package/dist/plugins/grideditor.tinymce.min.js.map +3 -3
- package/docs/events.md +4 -6
- package/docs/locale-keys.md +35 -13
- package/docs/plugins.md +15 -35
- package/example/ckeditor.html +0 -5
- package/example/containers.html +64 -2
- package/example/index.html +5 -4
- package/example/style.html +16 -4
- package/example/utilities.html +12 -11
- package/package.json +1 -1
- package/src/js/dom.js +1 -2
- package/src/js/grideditor.jquery.js +7 -28
- package/src/js/grideditor.js +12 -81
- package/src/js/locales/grideditor.es.js +30 -6
- package/src/js/plugins/grideditor.alignment.js +21 -50
- package/src/js/plugins/grideditor.ckeditor.js +10 -23
- package/src/js/plugins/grideditor.style.js +18 -12
- package/src/js/plugins/grideditor.summernote.js +4 -5
- package/src/js/plugins/grideditor.tabs.js +311 -5
- package/src/js/plugins/grideditor.tinymce.js +4 -17
- package/src/js/style/accordion.js +14 -3
- package/src/js/style/display.js +229 -0
- package/src/js/style/drawerflow.js +118 -0
- package/src/js/style/flex.js +156 -0
- package/src/js/style/float.js +2 -4
- package/src/js/style/options.js +5 -20
- package/src/js/style/sections.js +42 -15
- package/src/js/style/spacing.js +2 -4
- package/src/js/style/sticky.js +39 -0
- package/src/js/style/textalign.js +2 -4
- package/src/js/text/grideditor.text.js +1 -1
- package/src/less/grideditor.less +68 -10
- package/types/grideditor.d.ts +24 -3
- package/dist/plugins/grideditor.float.esm.js +0 -43
- package/dist/plugins/grideditor.float.js +0 -47
- package/dist/plugins/grideditor.float.min.js +0 -1
- package/dist/plugins/grideditor.float.min.js.map +0 -7
- package/dist/plugins/grideditor.spacing.esm.js +0 -327
- package/dist/plugins/grideditor.spacing.js +0 -329
- package/dist/plugins/grideditor.spacing.min.js +0 -1
- package/dist/plugins/grideditor.spacing.min.js.map +0 -7
- package/dist/plugins/grideditor.textalign.esm.js +0 -49
- package/dist/plugins/grideditor.textalign.js +0 -53
- package/dist/plugins/grideditor.textalign.min.js +0 -1
- package/dist/plugins/grideditor.textalign.min.js.map +0 -7
- package/dist/plugins/grideditor.visibility.esm.js +0 -167
- package/dist/plugins/grideditor.visibility.js +0 -169
- package/dist/plugins/grideditor.visibility.min.js +0 -1
- package/dist/plugins/grideditor.visibility.min.js.map +0 -7
- package/src/js/plugins/grideditor.float.js +0 -29
- package/src/js/plugins/grideditor.spacing.js +0 -31
- package/src/js/plugins/grideditor.textalign.js +0 -27
- package/src/js/plugins/grideditor.visibility.js +0 -32
- package/src/js/style/visibility.js +0 -160
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,82 @@ 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
|
+
## [8.0.0-beta.3] - 2026-09-30
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Variants for the tabs container: style (`nav-tabs`, `nav-pills`,
|
|
12
|
+
`nav-underline`), width (`nav-fill`, `nav-justified`), alignment
|
|
13
|
+
(`justify-content-center`, `-end`) and a vertical layout, always or from a
|
|
14
|
+
breakpoint up (`d-{bp}-flex`, `flex-{bp}-column`). They are chosen in a
|
|
15
|
+
Tabs section of the container's settings panel, given to
|
|
16
|
+
`createContainer('tabs', { variant, width, align, vertical })`, or set for
|
|
17
|
+
the new ones with the `tabs` setting. While editing, each view shows the
|
|
18
|
+
layout its breakpoint has.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- A tab strip without `nav-tabs` - pills or underline written by hand - is
|
|
22
|
+
recognised as tabs.
|
|
23
|
+
|
|
24
|
+
## [8.0.0-beta.2] - 2026-09-29
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- The style plugin's catalog has Bootstrap 5.3's colors: `bg-*-subtle`,
|
|
28
|
+
`text-bg-*`, `text-*-emphasis`, `text-body-emphasis` and `border-*-subtle`,
|
|
29
|
+
the opacities `bg-opacity-*`, `text-opacity-*` and `border-opacity-*`,
|
|
30
|
+
`fixed-top` and `fixed-bottom`, and on an element `img-fluid`,
|
|
31
|
+
`img-thumbnail` and `object-fit-*`.
|
|
32
|
+
- A Flex section in the style plugin: direction, wrap, `justify-content`,
|
|
33
|
+
`align-items`, `align-content`, and on anything but a row `gap`,
|
|
34
|
+
`row-gap`, `column-gap`, fill, grow and shrink, per breakpoint, with
|
|
35
|
+
`vstack` and `hstack` as chips. `style.sections.flex` turns it off.
|
|
36
|
+
- `sticky-{bp}-top` and `sticky-{bp}-bottom`, per breakpoint, in the style
|
|
37
|
+
plugin's Position section.
|
|
38
|
+
- On a node that is flex or grid in the view being edited, the drawer sits
|
|
39
|
+
on top out of the flow, and the canvas lays the content out as the page
|
|
40
|
+
will.
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
- **BREAKING:** The style plugin's `visibility` utility is `display`, and
|
|
44
|
+
edits every `d-{bp}-*` value from `none` to `inline-flex`. The eye shows a
|
|
45
|
+
node again with the display it has below, so a flex column comes back
|
|
46
|
+
flex. `utility.visibility` and `utility.visibility_shown` are gone from the
|
|
47
|
+
locales, and `utility.display` is new.
|
|
48
|
+
- **BREAKING:** `justify-content-*` and `align-items-*` are the style
|
|
49
|
+
plugin's, in its Flex section, on rows, columns, elements and containers.
|
|
50
|
+
The alignment plugin keeps `align-self-*` only.
|
|
51
|
+
- A node Bootstrap hides in the view being edited is kept on the canvas with
|
|
52
|
+
the display it would have, not as a block.
|
|
53
|
+
## [8.0.0-beta.1] - 2026-09-29
|
|
54
|
+
|
|
55
|
+
Not published: what it holds shipped in 8.0.0-beta.2.
|
|
56
|
+
|
|
57
|
+
### Removed
|
|
58
|
+
- **BREAKING:** `grideditor.spacing.js`, `grideditor.textalign.js`,
|
|
59
|
+
`grideditor.visibility.js` and `grideditor.float.js`, deprecated in 7.3:
|
|
60
|
+
the style plugin carries them. Their names in the `plugins` setting are
|
|
61
|
+
plugins that are not loaded.
|
|
62
|
+
- **BREAKING:** `utilities.spacing` and `utilities.visibility` are no longer
|
|
63
|
+
read; they are `style.spacing` and `style.visibility`.
|
|
64
|
+
- **BREAKING:** `replaces` on a plugin's factory, added in 7.3 for those
|
|
65
|
+
plugins.
|
|
66
|
+
- **BREAKING:** The numeric layout mode indexes of 2.x in `changeView`,
|
|
67
|
+
`getUtility` and `setUtility`: they are views that do not exist.
|
|
68
|
+
- **BREAKING:** The warnings about `sortable_options` and
|
|
69
|
+
`resizable_options`, removed in 4.0, and about `tinymce.config.oninit`,
|
|
70
|
+
removed in 7.0: they are ignored, and `oninit` is passed to tinyMCE as it
|
|
71
|
+
is.
|
|
72
|
+
- **BREAKING:** `ckeditor.config.on.instanceReady`, CKEditor 4's, which 7.x
|
|
73
|
+
called itself: it is not called, and `on` goes to CKEditor 5 as it is.
|
|
74
|
+
- **BREAKING:** The adapter's `$.fn.gridEditor.containers`, `.features`,
|
|
75
|
+
`.utilities` and `.texts`, which kept a plugin written for 6.x from
|
|
76
|
+
throwing: one throws as it loads now.
|
|
77
|
+
- The locale keys `warning.setting_removed`, `warning.oninit_removed` and
|
|
78
|
+
`warning.plugin_6x`, and the words on CKEditor 4 in
|
|
79
|
+
`error.ckeditor_missing`.
|
|
80
|
+
- Notes on earlier versions in the README, the docs and the code;
|
|
81
|
+
UPGRADING.md keeps them. See [UPGRADING.md](UPGRADING.md).
|
|
82
|
+
|
|
83
|
+
|
|
8
84
|
## [7.3.0] - 2026-09-29
|
|
9
85
|
|
|
10
86
|
### Added
|
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 —
|
|
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 — display, flex, order, alignment, gutters, spacing, text alignment, sticky 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
|
|
@@ -45,11 +45,10 @@ package: an Angular CLI project, with a build step, unlike the pages above.
|
|
|
45
45
|
Installation
|
|
46
46
|
------------
|
|
47
47
|
|
|
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
|
|
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.
|
|
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 5's browser build (`ckeditor5.umd.js` and `ckeditor5.css`) and `dist/plugins/grideditor.ckeditor.min.js`.
|
|
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).
|
|
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`.
|
|
53
52
|
* From npm:
|
|
54
53
|
|
|
55
54
|
```
|
|
@@ -111,7 +110,7 @@ Load the classic script *or* the module build on a page, never both.
|
|
|
111
110
|
|
|
112
111
|
A page that uses the jQuery API of 6.x - `$(el).gridEditor(...)`, jQuery
|
|
113
112
|
events, jQuery objects in the payloads - keeps it by loading jQuery 4 and the
|
|
114
|
-
adapter after the editor, and the
|
|
113
|
+
adapter after the editor, and the plugins after that:
|
|
115
114
|
|
|
116
115
|
```html
|
|
117
116
|
<script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
|
|
@@ -120,7 +119,8 @@ adapter after the editor, and the 7.x plugins after that:
|
|
|
120
119
|
<script src="grid-editor/dist/plugins/grideditor.tabs.min.js"></script>
|
|
121
120
|
```
|
|
122
121
|
|
|
123
|
-
Plugins written for 6.x
|
|
122
|
+
Plugins written for 6.x do not work with it, and throw as they register on
|
|
123
|
+
`$.fn.gridEditor`: [UPGRADING.md](UPGRADING.md) says how to port one.
|
|
124
124
|
|
|
125
125
|
Usage
|
|
126
126
|
-----
|
|
@@ -215,7 +215,7 @@ ge.settings.locale; // 'en'
|
|
|
215
215
|
A html string written into the canvas - through the source view,
|
|
216
216
|
`source_textarea`, `createElement` or a paste - is parsed as `innerHTML`
|
|
217
217
|
parses: a `<script>` in it is kept in the markup and does not run in the
|
|
218
|
-
editor.
|
|
218
|
+
editor.
|
|
219
219
|
|
|
220
220
|
Events
|
|
221
221
|
------
|
|
@@ -306,7 +306,7 @@ which loses to `col-auto` and `col-N`. `row_cols: false` takes the field away.
|
|
|
306
306
|
In a breakpoint view a size or an offset is written for that breakpoint. In the
|
|
307
307
|
all view it is written once, as the class with no breakpoint (`col-4`,
|
|
308
308
|
`offset-2`), and the breakpoints' own sizes or offsets are taken off: one value
|
|
309
|
-
for every size.
|
|
309
|
+
for every size.
|
|
310
310
|
|
|
311
311
|
The settings button on a row, a column, a container, a tab, an accordion item
|
|
312
312
|
or an element opens a panel with two fields: the node's `id`, and its css
|
|
@@ -428,7 +428,7 @@ __`settings_panel`:__ Where the settings a gear opens are shown - a node's id, i
|
|
|
428
428
|
| `'offcanvas'` | A Bootstrap offcanvas at the side of the window, from the bottom on a phone. It does not move the canvas, and has room for every field |
|
|
429
429
|
| `'popover'` | A Bootstrap popover under the gear, or over it when there is more room there; a press anywhere else puts it away |
|
|
430
430
|
| `'modal'` | A Bootstrap modal |
|
|
431
|
-
| `'inline'` | Unfolded in the drawer itself
|
|
431
|
+
| `'inline'` | Unfolded in the drawer itself |
|
|
432
432
|
|
|
433
433
|
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.
|
|
434
434
|
|
|
@@ -454,7 +454,7 @@ new GridEditor('#myGrid', {
|
|
|
454
454
|
|
|
455
455
|
### Breakpoints and sizing
|
|
456
456
|
|
|
457
|
-
__`layout_modes`:__ Which views the toolbar dropdown offers. Default `['all', 'xs', 'sm', 'md', 'lg', 'xl', 'xxl']`. Offer fewer
|
|
457
|
+
__`layout_modes`:__ Which views the toolbar dropdown offers. Default `['all', 'xs', 'sm', 'md', 'lg', 'xl', 'xxl']`. Offer fewer for a simpler dropdown:
|
|
458
458
|
|
|
459
459
|
```javascript
|
|
460
460
|
new GridEditor('#myGrid', {
|
|
@@ -482,7 +482,7 @@ new GridEditor('#myGrid', {
|
|
|
482
482
|
A column's text is a *text block*: a content area, the text editor that edits
|
|
483
483
|
it, and a drawer of its own - move, which editor, settings, the host's
|
|
484
484
|
`text_tools`, delete - like any other block. It drags between columns, the
|
|
485
|
-
clipboard copies it, and spacing, text alignment and
|
|
485
|
+
clipboard copies it, and spacing, text alignment and display apply to it.
|
|
486
486
|
The markup does not change: the drawer sits beside the content area in a
|
|
487
487
|
wrapper that only exists while editing, because inside it the text editor would
|
|
488
488
|
take it for text. It sits over the text's top right corner and takes no room,
|
|
@@ -581,8 +581,9 @@ time, and the one you opened last is open on the next node too.
|
|
|
581
581
|
| Background | color, image, size, position, repeat | |
|
|
582
582
|
| Text | color, size, alignment, and a text shadow builder | `text-{bp}-start`, `-center`, `-end` |
|
|
583
583
|
| Typography | family, weight, style, line height, letter spacing, transform, decoration | |
|
|
584
|
-
| Display | display, opacity, overflow, visibility |
|
|
585
|
-
|
|
|
584
|
+
| Display | display, opacity, overflow, visibility | display, `d-{bp}-*` from `none` to `inline-flex`, with the eye in the drawer that hides and shows |
|
|
585
|
+
| Flex | | direction, wrap, `justify-content-{bp}-*`, `align-items-{bp}-*`, `align-content-{bp}-*`; on anything but a row the gaps, `gap-{bp}-{0–5}`, `row-gap-*`, `column-gap-*`, and fill, grow and shrink |
|
|
586
|
+
| Position | position, `top`, `right`, `bottom`, `left` (not on a column), `z-index` | sticky, `sticky-{bp}-top` / `-bottom`; float, `float-{bp}-*`, on an element |
|
|
586
587
|
| Custom css | whatever no field stands for, as text | |
|
|
587
588
|
|
|
588
589
|
What you type goes to the node's own `style`, through the browser: a value it
|
|
@@ -594,8 +595,9 @@ A text gets only Text and Display, with their per breakpoint fields: its
|
|
|
594
595
|
editor owns what is inside it.
|
|
595
596
|
|
|
596
597
|
Every section but Spacing and Custom css also offers Bootstrap's classes for
|
|
597
|
-
what it styles - `rounded-3`, `shadow-sm`, `bg-primary`, `
|
|
598
|
-
`opacity-50`, `
|
|
598
|
+
what it styles - `rounded-3`, `shadow-sm`, `bg-primary`, `bg-primary-subtle`,
|
|
599
|
+
`text-bg-dark`, `bg-opacity-50`, `fs-4`, `fw-bold`, `vstack`, `fixed-top`,
|
|
600
|
+
and on an element `img-fluid` and `object-fit-cover`… - as chips. A chip puts its class in the
|
|
599
601
|
classes field, and pressing it again takes it off; chips that are
|
|
600
602
|
alternatives, like `rounded-2` and `rounded-pill`, take each other off.
|
|
601
603
|
Bootstrap's utilities are `!important`, so a field whose property a class on
|
|
@@ -614,13 +616,13 @@ new GridEditor('#myGrid', {
|
|
|
614
616
|
border: { properties: ['border-width', 'border-color'], catalog: false }, // two fields, no chips
|
|
615
617
|
},
|
|
616
618
|
spacing: { values: ['0', '2', '4'], scale: [/* if you changed $spacers */] },
|
|
617
|
-
visibility: { drawer: false }, // no eye in the drawers, the field only
|
|
619
|
+
visibility: { drawer: false }, // no eye in the drawers, the display field only
|
|
618
620
|
},
|
|
619
621
|
});
|
|
620
622
|
```
|
|
621
623
|
|
|
622
624
|
The sections are `size`, `spacing`, `border`, `background`, `text`,
|
|
623
|
-
`typography`, `display`, `position` and `custom`. `properties` chooses and
|
|
625
|
+
`typography`, `display`, `flex`, `position` and `custom`. `properties` chooses and
|
|
624
626
|
orders a section's inline fields; the per breakpoint ones stay while the
|
|
625
627
|
section does. What a section you left out or narrowed would have shown is in
|
|
626
628
|
Custom css.
|
|
@@ -628,6 +630,10 @@ Custom css.
|
|
|
628
630
|
Sanitizing what `getHtml` returns is the page's business, style attributes
|
|
629
631
|
included.
|
|
630
632
|
|
|
633
|
+
A node that is flex or grid in the view you are in - a column with `d-flex`,
|
|
634
|
+
a row with `flex-nowrap` - has its drawer on top, out of the flow, so the
|
|
635
|
+
canvas lays out its content as the page will.
|
|
636
|
+
|
|
631
637
|
See [example/style.html](example/style.html).
|
|
632
638
|
|
|
633
639
|
### Responsive utilities
|
|
@@ -645,9 +651,9 @@ plugins of their own; the ones that style a node are the style plugin's, above.
|
|
|
645
651
|
| Plugin | Classes | On |
|
|
646
652
|
| --- | --- | --- |
|
|
647
653
|
| `order` | `order-{bp}-{first,0–5,last}` | columns |
|
|
648
|
-
| `alignment` | `
|
|
654
|
+
| `alignment` | `align-self-{bp}-*` | columns |
|
|
649
655
|
| `gutters` | `g-{bp}-{0–5}`, `gx-{bp}-*`, `gy-{bp}-*` | rows |
|
|
650
|
-
| `style` |
|
|
656
|
+
| `style` | display, flex (a row's `justify-content-*` and `align-items-*` among it), spacing, text alignment, sticky and float; see [Style](#style) | rows, columns, elements, containers, texts |
|
|
651
657
|
|
|
652
658
|
A plugin puts a field in the *Responsive* section of each drawer's settings
|
|
653
659
|
panel - or, for the style plugin, in its section of the *Style* accordion -
|
|
@@ -658,8 +664,8 @@ replaces what the breakpoints said. While you edit, the canvas shows what the
|
|
|
658
664
|
classes mean in the view you are in; `getHtml` returns only the classes.
|
|
659
665
|
|
|
660
666
|
```javascript
|
|
661
|
-
ge.setUtility(column, '
|
|
662
|
-
ge.getUtility(column, '
|
|
667
|
+
ge.setUtility(column, 'display', 'none', 'md'); // d-md-none
|
|
668
|
+
ge.getUtility(column, 'display', 'lg'); // 'none', inherited
|
|
663
669
|
```
|
|
664
670
|
|
|
665
671
|
__`utilities`:__ Options for each plugin, under its name.
|
|
@@ -673,12 +679,6 @@ new GridEditor('#myGrid', {
|
|
|
673
679
|
});
|
|
674
680
|
```
|
|
675
681
|
|
|
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
|
-
|
|
682
682
|
See [example/utilities.html](example/utilities.html), and
|
|
683
683
|
[docs/plugins.md](docs/plugins.md#utility-plugins) for writing one.
|
|
684
684
|
|
|
@@ -777,6 +777,13 @@ __`plugins`:__ Which of the loaded plugins to use, containers, features and util
|
|
|
777
777
|
new GridEditor('#myGrid', { plugins: ['tabs', 'elements'] });
|
|
778
778
|
```
|
|
779
779
|
|
|
780
|
+
__`tabs`:__ The variant of the tabs containers made new, from the toolbar or with `createContainer`: `variant` (`'tabs'`, `'pills'` or `'underline'`), `width` (`'natural'`, `'fill'` or `'justified'`), `align` (`'start'`, `'center'` or `'end'`, with the natural width only) and `vertical` (`false`, `true`, or a breakpoint to go vertical from, `'md'`). Every tabs container also has a *Tabs* section in its settings panel, which changes its own. It is all Bootstrap's classes on the strip and the container, so a page's markup says it too - pills written by hand are tabs.
|
|
781
|
+
|
|
782
|
+
```javascript
|
|
783
|
+
new GridEditor('#myGrid', { tabs: { variant: 'pills', vertical: 'md' } }); // a side menu from tablet up
|
|
784
|
+
ge.createContainer('tabs', { variant: 'underline', width: 'fill' }); // an option given wins
|
|
785
|
+
```
|
|
786
|
+
|
|
780
787
|
__`container_tools`, `tab_tools`, `accordion_tools`:__ Extra tools on the container drawer and on each pane's drawer, same shape as `row_tools`.
|
|
781
788
|
|
|
782
789
|
```javascript
|
|
@@ -949,9 +956,6 @@ new GridEditor('#myGrid', {
|
|
|
949
956
|
});
|
|
950
957
|
```
|
|
951
958
|
|
|
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
|
-
|
|
955
959
|
__`summernote.config`:__ Specify summernote config, when using the `summernote` `content_types`.
|
|
956
960
|
See the [summernote documentation](http://summernote.org/deep-dive/).
|
|
957
961
|
Also check out the [summernote example](example/summernote.html).
|
package/UPGRADING.md
CHANGED
|
@@ -1,3 +1,58 @@
|
|
|
1
|
+
Upgrading from grid-editor `7.x` to `8.0`
|
|
2
|
+
=========================================
|
|
3
|
+
|
|
4
|
+
8.0 takes out what kept pages, plugins and options of earlier versions
|
|
5
|
+
working. Nothing it removes warns: an option that is gone is ignored like any
|
|
6
|
+
option the editor does not know. The jQuery adapter stays, and so does the
|
|
7
|
+
conversion of markup 5.x saved. `8.0.0-beta.2` is the first beta published
|
|
8
|
+
(`8.0.0-beta.1` never was); install it with
|
|
9
|
+
`npm install @themarioga/grid-editor@next`.
|
|
10
|
+
|
|
11
|
+
* __The spacing, textalign, visibility and float plugins are gone.__ Load
|
|
12
|
+
`grideditor.style.js`, which has carried them since 7.3, and name it in the
|
|
13
|
+
`plugins` setting: `'spacing'`, `'textalign'`, `'visibility'` and `'float'`
|
|
14
|
+
there are plugins that are not loaded now, and only get the usual warning.
|
|
15
|
+
* __`utilities.spacing` and `utilities.visibility` are not read.__ They are
|
|
16
|
+
`style.spacing` and `style.visibility`.
|
|
17
|
+
* __`replaces` on a plugin's factory does nothing.__ A plugin that stood in
|
|
18
|
+
for another is loaded beside it, like any two plugins.
|
|
19
|
+
* __`changeView`, `getUtility` and `setUtility` take a view key only.__ The
|
|
20
|
+
numeric indexes of 2.x - `0`, `1`, `2` for desktop, tablet and phone - are
|
|
21
|
+
views that do not exist: `changeView(0)` warns that there is no such
|
|
22
|
+
layout mode and does nothing. Pass `'lg'`, `'sm'` or `'xs'`.
|
|
23
|
+
* __`sortable_options` and `resizable_options` are ignored__, without the
|
|
24
|
+
warning 4.0 gave: use `drag` and `resize`.
|
|
25
|
+
* __`tinymce.config.oninit` is passed to tinyMCE as it is__, without the
|
|
26
|
+
warning 7.0 gave: use `init_instance_callback`.
|
|
27
|
+
* __`ckeditor.config.on.instanceReady` is not called.__ It was CKEditor 4's,
|
|
28
|
+
and 7.x called it itself; `on` goes to CKEditor 5 as it is, which does not
|
|
29
|
+
know it. A function in `config.extraPlugins` is CKEditor 5's way: it is
|
|
30
|
+
called with the editor as the editor starts.
|
|
31
|
+
* __The adapter has no `$.fn.gridEditor.containers`, `.features`,
|
|
32
|
+
`.utilities` or `.texts`.__ A plugin written for 6.x that registers there
|
|
33
|
+
throws as it loads, where 7.x warned and left it out. Port it: see
|
|
34
|
+
"Port a plugin written for 6.x" below.
|
|
35
|
+
* __Gone from the locales:__ `warning.setting_removed`,
|
|
36
|
+
`warning.oninit_removed` and `warning.plugin_6x`. A locale of your own
|
|
37
|
+
can drop them.
|
|
38
|
+
|
|
39
|
+
What `8.0.0-beta.2` adds to that:
|
|
40
|
+
|
|
41
|
+
* __The `visibility` utility is `display`.__ It edits every `d-{bp}-*`
|
|
42
|
+
value now, not only hidden and shown: `setUtility(node, 'display', 'none',
|
|
43
|
+
'md')`, and `before-utility` and `after-utility` say `family: 'display'`.
|
|
44
|
+
`'visibility'` is a family no plugin declares, and gets the usual warning.
|
|
45
|
+
The eye and `style.visibility.drawer` are as they were.
|
|
46
|
+
* __A row's `justify-content-*` and `align-items-*` are the style plugin's.__
|
|
47
|
+
They are in its Flex section, on rows and on anything made flex, and the
|
|
48
|
+
alignment plugin keeps `align-self-*` only. A page that loads alignment
|
|
49
|
+
without style has no field for them: load `grideditor.style.js`.
|
|
50
|
+
* __Locale keys:__ `utility.visibility` and `utility.visibility_shown` are
|
|
51
|
+
gone, and `utility.display` is new; `utility.justify_content` and
|
|
52
|
+
`utility.align_items` come with the style plugin now. The Flex section and
|
|
53
|
+
sticky bring keys of their own, listed in
|
|
54
|
+
[docs/locale-keys.md](docs/locale-keys.md).
|
|
55
|
+
|
|
1
56
|
Upgrading from grid-editor `7.2` to `7.3`
|
|
2
57
|
=========================================
|
|
3
58
|
|