JSFiddle - React, Tailwind, and code Playground

HTML

<div id="copy_container" style="position:relative; margin:20px; float:left; padding:3px; border: 1px solid green;">
    <div id="copy">Text</div>
    <div>
        <script src="https://raw.github.com/jonrohan/ZeroClipboard/master/ZeroClipboard.min.js" type="text/javascript"></script>
        <script>
$(function(){
    // give the path to flash movie file
            ZeroClipboard.setMoviePath('http://jonrohan.github.com/ZeroClipboard/javascripts/ZeroClipboard.swf');

    //create a ZeroClipboard client
    var clip = new ZeroClipboard.Client();

    //bind the mouse events to be listened to initiate copy
    // you can use mouse up or something else also
    clip.addEventListener('mousedown',function(client){
         // Set what text you want to save in clipboard
         clip.setText($("#copy").text())
    })

    // The flash movie will fire a complete event after saving text in clipboard
    // we can do some callback functions here
    clip.addEventListener('complete',function(client,text) {
          alert("Copied: "+text)
    });

    // bind the element we need this feature. Note hat copy is the id of that DOM element
    clip.glue("copy")

})
</script>