We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

144537 May 10,2019 10:02 AM UTC May 10,2019 12:23 PM UTC Angular - EJ 2 3
loading
Tags: Diagram
Laurens Albers
Asked On May 10, 2019 10:02 AM UTC

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





Ramya Thirugnanam [Syncfusion]
Replied On 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  


Laurens Albers
Replied On 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

Ramya Thirugnanam [Syncfusion]
Replied On May 10, 2019 12:23 PM UTC

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon