Disable copy, paste in diagram: Angular 7+, TypeScript 3+

Hi,

Is there a neat way of blocking(only) the ctrl+c, & ctr+v functionality after selecting node(s)?
I tried using your "CommandManagerModel(see 1.)" and returning false based upon the keys, but this doesnt not seem to work.
Is there another way?

thank you in advance!

greetings,

Laurens Albers





3 Replies

RT Ramya Thirugnanam Syncfusion Team May 10, 2019 11:11 AM UTC

Hi Laurens,  
 
Thanks for contacting Syncfusion support. 
  
We can disable the commands by overring the command manager. Please find the code example to disable the keyboard commands.  
  
public commandManager: CommandManagerModel = {  
commands: [{  
name: 'paste',  
canExecute: (): boolean => {   
return false;  
 
}]  
};  
  
  
Regards,  
Ramya T  



LA Laurens Albers May 10, 2019 12:04 PM UTC

Hi,

I was very close it seems, but now thanks to your input it works.

Have a nice day/weekend!

greetings,

Laurens


RT Ramya Thirugnanam Syncfusion Team May 10, 2019 12:23 PM UTC

Hi Laurens, 
 
Thanks for your update. 
 
Regards, 
Ramya T 


Loader.
Up arrow icon