Copy text from another element

A pretty common use case is to copy content from another element. You can do that by adding a data-clipboard-target attribute in your trigger element.

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus hic magnam accusantium sapiente, sit fugiat tempore molestias perferendis sunt sint. Please press the button and copy me!
Cut text from another element

Additionally, you can define a data-clipboard-action attribute to specify if you want to either copy or cut content.

Playground

Paste and test you copied text.

Jhon Smith

Active

  • 11:11 AM, Today
    Hi Robert , how are you?
  • 11:15 AM, Today
    Fine. and you?
  • 11:16 AM, Today
    Fine. What's about vacation?.
  • 11:18 AM, Today
    We think for next weekend.
    Have fun!
6