v7.3.0

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.

Requires selectionMode.cell to be activated. Also, if the CellEdit feature is disabled, the copyOnly config will default to `true` which prevents cut-and-paste actions completely. Set copyOnly to `false` to prevent this behaviour.

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 true to 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.
Please note that Ctrl is the equivalent to Command and Alt is the equivalent to Option for Mac users

For more information on how to customize keyboard shortcuts, please see this guide.

See also

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class

Properties

Properties are getters/setters or publicly accessible variables on this class

Functions

Functions are methods available for calling on the class
    • copy( )
      ASYNC

      Copies selected cells to clipboard (native if accessible) to paste later

    • cut( )
      ASYNC

      Cuts selected cells to clipboard (native if accessible) to paste later

    Events

    Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

    Event handlers

    Event handlers are callbacks called as a result of certain actions in this class
    id: cellCopyPaste

    Source path

    Grid/feature/CellCopyPaste.js

    Contents