Copy text to clipboard

Hi! Can you please help me to add a custom code to a text widget that will copy this text to the clipboard? Not a button, just text.

+1 for this! Thanks in advance