Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular paste from clipboard

Is there a chance to implement a paste button in Angular.

FE: User copies a link of the website and on my page when he or she hits a button copied link should appear in a textbox.

Thanks!

like image 741
Denis Bellato Avatar asked Dec 13 '22 12:12

Denis Bellato


1 Answers

You can only copy from a webpage programmatically. You cannot programmatically paste anything because this is a security violation. However, you can add

(paste)="onPaste($event)" 

to get the pasted clipboard details from control + v

like image 74
Dilshan Liyanage Avatar answered Dec 29 '22 11:12

Dilshan Liyanage