Posted 17 November 2022, 6:48 am EST
Hi,
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");
}
})
Sample: https://jscodemine.grapecity.com/share/nFJW4WGKA0mrl0e54etTWA/
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: https://codesandbox.io/s/tender-banach-jbvhx2?file=/src/index.js
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: https://www.grapecity.com/spreadjs/docs/features/worksheet/celllock#site_main_content-doc-content_title
Regards,
Ankit