SpreadJS Documentation
Deactivating Clipboard Keys

You can deactivate Clipboard actions.

Using Code

This example cancels the default cut, copy, and paste keys.

JavaScript
Copy Code
$(document).ready(function () {
    var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3});
    var sheet = spread.getActiveSheet();
 GcSpread.Sheets.SpreadActions.none = function() {

    };

    var key = GcSpread.Sheets.Key;
    //Disable CTRL+C
    sheet.addKeyMap(key.c, true, false, false, false, GcSpread.Sheets.SpreadActions.none);
    
    //Disable CTRL+X
    sheet.addKeyMap(key.x, true, false, false, false, GcSpread.Sheets.SpreadActions.none);
    
    //Disable CTRL+V
    sheet.addKeyMap(key.v, true, false, false, false, GcSpread.Sheets.SpreadActions.none);
});
See Also

Developer's Guide

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.