@themarioga/grid-editor 9.0.0-beta.1 → 9.0.0-beta.2
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 +14 -0
- package/README.md +18 -0
- package/UPGRADING.md +5 -0
- package/dist/grideditor.bundle.min.js +2 -2
- package/dist/grideditor.d.ts +3 -1
- package/dist/grideditor.esm.js +36 -1
- package/dist/grideditor.js +36 -1
- package/dist/grideditor.min.js +1 -1
- package/dist/grideditor.min.js.map +3 -3
- package/dist/plugins/grideditor.clipboard.esm.js +116 -2
- package/dist/plugins/grideditor.clipboard.js +116 -2
- package/dist/plugins/grideditor.clipboard.min.js +1 -1
- package/dist/plugins/grideditor.clipboard.min.js.map +3 -3
- package/docs/events.md +1 -1
- package/docs/plugins.md +4 -0
- package/package.json +1 -1
- package/src/js/grideditor.js +21 -0
- package/src/js/plugins/grideditor.clipboard.js +125 -2
- package/types/grideditor.d.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,20 @@ 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.2] - 2026-10-20
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- clipboard: Ctrl+C and Ctrl+V (⌘C and ⌘V) with `active_target`, and so with
|
|
12
|
+
the sidebar. Ctrl+C copies the node selected or the target; Ctrl+V pastes
|
|
13
|
+
into the target, or the node selected, by the paste rules the toolbar and
|
|
14
|
+
the tools already have. The keys stay the browser's while a field or a
|
|
15
|
+
text is edited, while text is selected, or while a panel or a dialog is
|
|
16
|
+
open. They use the plugin's own store, never the system clipboard, and go
|
|
17
|
+
to the editor used last. `clipboard: { shortcuts: false }` turns them off;
|
|
18
|
+
`after-copy` says `source: 'shortcut'` for them.
|
|
19
|
+
- The plugin handle has `getSelected()`, `getActiveTarget()`, `panelOpen()`
|
|
20
|
+
and `contains(node)`.
|
|
21
|
+
|
|
8
22
|
## [9.0.0-beta.1] - 2026-10-20
|
|
9
23
|
|
|
10
24
|
### Changed
|
package/README.md
CHANGED
|
@@ -844,6 +844,24 @@ A paste is an add like any other: `before-add-*` and `after-add-*` with
|
|
|
844
844
|
`source: 'paste'`, and canceling the first turns it away. A copy fires
|
|
845
845
|
`grideditor:after-copy`.
|
|
846
846
|
|
|
847
|
+
With `active_target` - which `settings_panel: 'sidebar'` turns on - there are
|
|
848
|
+
shortcuts too, Ctrl+C and Ctrl+V (⌘C and ⌘V on a Mac). Ctrl+C copies the node
|
|
849
|
+
selected in the sidebar or, with none, the target, as its *Copy* tool would.
|
|
850
|
+
Ctrl+V pastes into the target as the toolbar's paste button would - a row at
|
|
851
|
+
its end, a section after the block it is in - and a text, a container or an
|
|
852
|
+
element at the end of a target column, as its *Paste* tool would; with no
|
|
853
|
+
target, into the node selected, as its *Paste* tool would. What does not fit
|
|
854
|
+
there is not pasted anywhere else. They go to the editor used last, and leave
|
|
855
|
+
the keys to the browser while a field or a text is being edited, while text
|
|
856
|
+
is selected (for Ctrl+C), while a settings panel, a dialog or the delete
|
|
857
|
+
confirmation is open, and outside editing. They use the same store as the
|
|
858
|
+
tools: the system clipboard is not read or written. `after-copy` says
|
|
859
|
+
`source: 'shortcut'` for a copy made with them.
|
|
860
|
+
|
|
861
|
+
__`clipboard`:__ `{ shortcuts }`, the plugin's settings. `shortcuts` defaults to
|
|
862
|
+
`active_target`; `false` turns them off, and `true` without `active_target`
|
|
863
|
+
warns and does nothing.
|
|
864
|
+
|
|
847
865
|
### Autosave
|
|
848
866
|
|
|
849
867
|
A plugin:
|
package/UPGRADING.md
CHANGED
|
@@ -7,6 +7,11 @@ Upgrading from grid-editor `8.x` to `9.0`
|
|
|
7
7
|
setting to have the sidebar without it. Clicking the canvas's background, or
|
|
8
8
|
pressing Escape, clears the target and the toolbar adds at the end of the
|
|
9
9
|
canvas again, as before.
|
|
10
|
+
* __With the clipboard plugin and `active_target`, Ctrl+C and Ctrl+V copy
|
|
11
|
+
and paste nodes.__ They act on the node selected or the target, and leave
|
|
12
|
+
the keys alone while a field or a text has the focus or text is selected.
|
|
13
|
+
`clipboard: { shortcuts: false }` turns them off. This came in
|
|
14
|
+
`9.0.0-beta.2`.
|
|
10
15
|
* __`settings_panel: 'sidebar'` with `active_target: false` throws.__ The
|
|
11
16
|
constructor raises a `TypeError` and builds nothing. Leave `active_target`
|
|
12
17
|
out, or give it `true`.
|