Button for Copy text to clipboard

Hello, guys. I am wondering how can I craete a component that has a button to copy its text content to the user's clipboard.

I would like to be able to copy the rich text's content only.

a!columnLayout(
  contents: {
    a!richTextDisplayField(
      label: "Lorem Ipsum",
      labelPosition: "ABOVE",
      value: {
        "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt."
      },
      marginBelow: "NONE"
    ),
    a!buttonArrayLayout(
      buttons: {
        
        a!buttonWidget(
          label: "Copy to clipboard",
          submit: false,
          width: "MINIMIZE",
          style: "LINK"
          
          
        )
      },
      align: "CENTER",
      marginAbove: "NONE",
      marginBelow: "NONE"
    )
  }
)

If there's any coding answer for its implementation, I would much appreciate it.

  Discussion posts and replies are publicly visible

Parents Reply Children