CellCopyPaste
Feature
Allows using [Ctrl/CMD + C], [Ctrl/CMD + X] and [Ctrl/CMD + V] to cut, copy and paste cell or cell ranges. Also makes cut, copy and paste actions available via the cell context menu.
This feature will work alongside with RowCopyPaste but there is differences on functionality.
- Context menu actions, and keyboard shortcuts, will be processed by either feature depending on what is selected and where the context menu was triggered. Set rowOptionsOnCellContextMenu to
trueto show two sets of options when context menu is triggered on a selected cell. - They share clipboard, so even when the internal clipboard is used, it is not possible to have rows and cells copied or cut at the same time.
If the Clipboard API is available, that will be used. This enables copying and pasting between different Bryntum products or completely different applications. Please note that only string values are supported.
This feature is disabled by default
const grid = new Grid({
features : {
cellCopyPaste : true
}
});
Keyboard shortcuts
The feature has the following default keyboard shortcuts:
| Keys | Action | Action description |
|---|---|---|
| Ctrl+C | copy | Calls copy which copies selected cell values into the clipboard. |
| Ctrl+X | cut | Calls cut which cuts out selected cell values and saves in clipboard. |
| Ctrl+V | paste | Calls paste which inserts string values from the clipboard. |
For more information on how to customize keyboard shortcuts, please see this guide.
See also
- RowCopyPaste - Copy/paste entire rows
- FillHandle - Drag-fill cells
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
Set this to
falseto not use native Clipboard API even if it is available
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of CellCopyPaste class, or subclass thereof.
-
Identifies an object as an instance of CellCopyPaste class, or subclass thereof.
Functions
Functions are methods available for calling on the class-
Copies selected cells to clipboard (native if accessible) to paste later
-
Cuts selected cells to clipboard (native if accessible) to paste later