JSFiddle - React, Tailwind, and code Playground

HTML

<textarea id="showthis" class="hide" readonly>dfdsfsfasdfdsfsfasdfssdfsfasf</textarea>

JavaScript

$(function(){
    var select_all = function(control){
        alert(document.getElementById("showthis").value);
        $(control).focus().select();
        var copy = $(control).val();
        window.prompt ("Copy to clipboard: Ctrl+C, Enter", copy);
    }
    $("#showthis").click(function(){
        select_all(this);
    })
})