@themarioga/grid-editor 9.0.0-beta.6 → 9.0.0-beta.7
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 +23 -0
- package/README.md +25 -12
- package/dist/grideditor.bundle.min.js +2 -2
- package/dist/grideditor.d.ts +7 -2
- package/dist/grideditor.esm.js +55 -7
- package/dist/grideditor.js +55 -7
- package/dist/grideditor.min.js +1 -1
- package/dist/grideditor.min.js.map +3 -3
- package/dist/locales/grideditor.es.esm.js +1 -0
- package/dist/locales/grideditor.es.js +1 -0
- package/dist/locales/grideditor.es.min.js +1 -1
- package/dist/locales/grideditor.es.min.js.map +2 -2
- package/dist/plugins/grideditor.accordion.esm.js +9 -0
- package/dist/plugins/grideditor.accordion.js +9 -0
- package/dist/plugins/grideditor.accordion.min.js +1 -1
- package/dist/plugins/grideditor.accordion.min.js.map +3 -3
- package/dist/plugins/grideditor.card.min.js +1 -1
- package/dist/plugins/grideditor.card.min.js.map +1 -1
- package/dist/plugins/grideditor.carousel.esm.js +3 -0
- package/dist/plugins/grideditor.carousel.js +3 -0
- package/dist/plugins/grideditor.carousel.min.js +1 -1
- package/dist/plugins/grideditor.carousel.min.js.map +3 -3
- package/dist/plugins/grideditor.ckeditor.esm.js +9 -0
- package/dist/plugins/grideditor.ckeditor.js +9 -0
- package/dist/plugins/grideditor.ckeditor.min.js +1 -1
- package/dist/plugins/grideditor.ckeditor.min.js.map +3 -3
- package/dist/plugins/grideditor.clipboard.esm.js +44 -7
- package/dist/plugins/grideditor.clipboard.js +44 -7
- package/dist/plugins/grideditor.clipboard.min.js +1 -1
- package/dist/plugins/grideditor.clipboard.min.js.map +3 -3
- 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.esm.js +3 -0
- package/dist/plugins/grideditor.elements.js +3 -0
- package/dist/plugins/grideditor.elements.min.js +1 -1
- package/dist/plugins/grideditor.elements.min.js.map +3 -3
- package/dist/plugins/grideditor.gutters.min.js.map +1 -1
- package/dist/plugins/grideditor.history.esm.js +1 -1
- package/dist/plugins/grideditor.history.js +1 -1
- package/dist/plugins/grideditor.history.min.js +1 -1
- package/dist/plugins/grideditor.history.min.js.map +2 -2
- package/dist/plugins/grideditor.inline-style.min.js.map +1 -1
- package/dist/plugins/grideditor.offcanvas.min.js.map +1 -1
- package/dist/plugins/grideditor.order.min.js +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.esm.js +9 -0
- package/dist/plugins/grideditor.sections.js +9 -0
- package/dist/plugins/grideditor.sections.min.js +1 -1
- package/dist/plugins/grideditor.sections.min.js.map +3 -3
- package/dist/plugins/grideditor.summernote.esm.js +9 -0
- package/dist/plugins/grideditor.summernote.js +9 -0
- package/dist/plugins/grideditor.summernote.min.js +1 -1
- package/dist/plugins/grideditor.summernote.min.js.map +3 -3
- package/dist/plugins/grideditor.tabs.esm.js +3 -0
- package/dist/plugins/grideditor.tabs.js +3 -0
- 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 +9 -0
- package/dist/plugins/grideditor.tinymce.js +9 -0
- package/dist/plugins/grideditor.tinymce.min.js +1 -1
- package/dist/plugins/grideditor.tinymce.min.js.map +3 -3
- package/docs/events.md +6 -1
- package/docs/locale-keys.md +1 -0
- package/docs/plugins.md +2 -1
- package/example/clipboard.html +7 -4
- package/package.json +1 -1
- package/src/js/dom.js +6 -0
- package/src/js/grideditor.js +58 -6
- package/src/js/locales/grideditor.es.js +1 -0
- package/src/js/plugins/grideditor.clipboard.js +61 -11
- package/src/js/plugins/grideditor.history.js +3 -3
- package/types/grideditor.d.ts +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,29 @@ 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.7] - 2026-10-21
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- clipboard: cut. A *Cut* tool beside *Copy* in every drawer that has it, and
|
|
12
|
+
Ctrl+X (⌘X) on the target, with `active_target`. It copies the node and
|
|
13
|
+
removes it as its delete tool does, without asking whatever `confirm_delete`
|
|
14
|
+
says. It is all or nothing: a `before-delete` that turns it away leaves the
|
|
15
|
+
clipboard as it was. The target goes to what held the node before it leaves,
|
|
16
|
+
so a paste right after puts it back. The `before-delete` and `after-delete`
|
|
17
|
+
of a cut have `source: 'cut'`, and `after-copy` has `cut`, true for a cut.
|
|
18
|
+
- The plugin handle's `ge.removeNode(node, { source, confirm, before })`: a node
|
|
19
|
+
removed as its own delete tool does, as asked.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- The plugin handle's `ge.setActiveTarget(null)` takes the target away, and
|
|
23
|
+
answers `true`.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
- history: deleting a node with its tool was two steps, one of them the canvas
|
|
27
|
+
halfway through the node's exit animation. A node animating out is marked
|
|
28
|
+
`ge-leaving` while it goes, and history waits for it: a delete, and a cut,
|
|
29
|
+
is one step. The mark never reaches `getHtml`.
|
|
30
|
+
|
|
8
31
|
## [9.0.0-beta.6] - 2026-10-21
|
|
9
32
|
|
|
10
33
|
### Changed
|
package/README.md
CHANGED
|
@@ -817,8 +817,8 @@ A plugin:
|
|
|
817
817
|
<script src="grid-editor/dist/plugins/grideditor.clipboard.min.js"></script>
|
|
818
818
|
```
|
|
819
819
|
|
|
820
|
-
Every row, column, section, text, container and element gets a *Copy* tool
|
|
821
|
-
drawer. While something is copied, a *Paste* tool shows wherever it can go, and
|
|
820
|
+
Every row, column, section, text, container and element gets a *Copy* tool and a
|
|
821
|
+
*Cut* tool in its drawer. While something is copied, a *Paste* tool shows wherever it can go, and
|
|
822
822
|
nowhere else:
|
|
823
823
|
|
|
824
824
|
| Copied | Pasted into |
|
|
@@ -853,17 +853,30 @@ A paste is an add like any other: `before-add-*` and `after-add-*` with
|
|
|
853
853
|
`source: 'paste'`, and canceling the first turns it away. A copy fires
|
|
854
854
|
`grideditor:after-copy`.
|
|
855
855
|
|
|
856
|
+
*Cut* is a copy and a delete in one: what it copies is what *Copy* would, and the
|
|
857
|
+
node goes out as its delete tool would take it, but without asking, whatever
|
|
858
|
+
`confirm_delete` says. It is all or nothing: if a `before-delete` handler turns
|
|
859
|
+
the delete away, nothing is copied and the clipboard keeps what it had. A cut
|
|
860
|
+
fires `before-delete`, `after-copy` (with `cut: true`) and `after-delete`, and
|
|
861
|
+
the two deletes have `source: 'cut'`. With `active_target`, the target goes to
|
|
862
|
+
what held the node - a text's column, a column's row, a row's column or section,
|
|
863
|
+
a container's pane's container - so a paste right after puts it back there; a
|
|
864
|
+
top-level row or section leaves no target. A cut is one step for the history
|
|
865
|
+
plugin, and what was cut stays in the clipboard after an undo. Tabs and
|
|
866
|
+
accordion items have no *Cut*, as they have no *Copy*.
|
|
867
|
+
|
|
856
868
|
With `active_target` - which `settings_panel: 'sidebar'` turns on - there are
|
|
857
|
-
shortcuts too, Ctrl+C and Ctrl+V (⌘C and ⌘V on a Mac). Ctrl+C copies
|
|
858
|
-
target, as its *Copy* tool would, whatever its level: a container, a row, an
|
|
859
|
-
element, a text. Ctrl+
|
|
860
|
-
the end of what it holds, in the row or the
|
|
861
|
-
the block it is in. With no target, they do
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
`source: 'shortcut'` for a copy
|
|
869
|
+
shortcuts too, Ctrl+C, Ctrl+X and Ctrl+V (⌘C, ⌘X and ⌘V on a Mac). Ctrl+C copies
|
|
870
|
+
the target, as its *Copy* tool would, whatever its level: a container, a row, an
|
|
871
|
+
element, a text. Ctrl+X cuts it, as its *Cut* tool would. Ctrl+V pastes into the
|
|
872
|
+
target as the toolbar adds to it - at the end of what it holds, in the row or the
|
|
873
|
+
column it lacks, a section after the block it is in. With no target, they do
|
|
874
|
+
nothing. They go to the editor used last, and leave the keys to the browser while
|
|
875
|
+
a field or a text is being edited, while text is selected (for Ctrl+C and
|
|
876
|
+
Ctrl+X), while a settings panel, a dialog or the delete confirmation is open, and
|
|
877
|
+
outside editing. They use the same store as the tools: the system clipboard is
|
|
878
|
+
not read or written. `after-copy` says `source: 'shortcut'` for a copy or a cut
|
|
879
|
+
made with them.
|
|
867
880
|
|
|
868
881
|
__`clipboard`:__ `{ shortcuts }`, the plugin's settings. `shortcuts` defaults to
|
|
869
882
|
`active_target`; `false` turns them off, and `true` without `active_target`
|