Copy/Paste in the Context Menu

This page shows how to use and configure the Context Menu's Copy and Paste features in Handsontable.

Copy and Paste feature are available in Handsontable by default, but only as key shortcuts (Ctrl (Cmd) + C and Ctrl (Cmd) + V respectively).
This plugin makes them available also as a clickable options in the context menu. Unfortunately, due to the browser's security restrictions, Handsontable is forced to use a third-party flash-based library. We chose to use ZeroClipboard - it adds a small invisible flash clip to your website, allowing the user to click on it, and thus save data to the clipboard.

Please note, that our Copy/Paste Context Menu plugin requires some additional preparation:

  • ZeroClipboard.js must be present on your server and included in your website's script tag.
  • ZeroClipboard.swf must also be present at your server

To configure Handsontable to use this plugin you need to add a contextMenuCopyPaste config item to your Hansontable instance.
It can be set to:

  • true - if the ZeroClipboard.swf file is placed in the same directory as the ZeroClipboard.js, or
  • {
    swfPath: [path to the swf file],
     }