2

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!

Janaka Ekanayake
  • 2,377
  • 10
  • 24
  • 48
Denis Bellato
  • 126
  • 1
  • 8
  • 1
    Possible duplicate of [How do I copy to the clipboard in JavaScript?](https://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript) – Edric Mar 31 '19 at 03:33
  • https://stackoverflow.com/questions/50138910/angular-on-paste-event-get-content – Ehsan Kiani Mar 31 '19 at 03:45

1 Answers1

9

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

Dilshan Liyanage
  • 3,382
  • 1
  • 24
  • 27