How to specify Copy and Cut event

Posted by: on 15 November 2022, 9:27 pm EST

  • Posted 15 November 2022, 9:27 pm EST

    _ In SpreadJS, I’m using ClipboardChanging event to track Copy/Cut action but I can’t specify which is which, is there any properties that I can specify an event is a Cut or a Copy event?

    _ When I set sheet.options.isProtected to “true”, how can I allow format cell in the code?

  • Posted 17 November 2022, 6:48 am EST


    With the latest version of SpreadJS V15.2.5, you can get the “isCutting” property in the ClipboardChanging Event. You could use the “isCutting” property to judge the if it’s a cut or a copy action. You can refer to the following code snippet:

        spread.bind(GC.Spread.Sheets.Events.ClipboardChanging, function(sender, args) {
            if(args.isCutting) {
                console.log("Cut Action");
            } else {
                console.log("Copy Action");


    If you are using the previous version of SpreadJS, you could overwrite the cut command and maintain a state if the cut action is performed. Please refer to the following sample:

    Currently, formatting cells is not allowed when you have the sheet protection allowed. You need to unprotect the sheet to allow format cell. For SpreadJS Designer component, it internally maintains a state to allow the Format Cells.

    You could refer to the following docs for all the protection options available:



Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels