Textbox with Autocopy on Click

Okay, so here's how I did it. First, create a Textbox style and paste it into your blog widget using the HTML/TEXT widget

<style>
.textarea {text-decoration: none; font-family: Arial; font-size: 18pt; color: #3366CC; letter-spacing: 2pt; border: 1px solid #808080; background-color: #D6E1F3}
</style>

The Next Part is to paste this JavaScript Code. You can add it on the same widget after the Style.

<script>
function myFunction() {
// Get the text field
var copyText = document.getElementById("myInput");
// Select the text field
copyText.select();
copyText.setSelectionRange(0, 99999); // For mobile devices
// Copy the text inside the text field
navigator.clipboard.writeText(copyText.value);
// Alert the copied text
alert("Copied the text: " + copyText.value);
}
</script>

After this, you have to save the widget, and it's up to you if you want to name it. I preferred to leave it blank so it will be invisible on the blog page.

Then, go ahead and create a post, then add the code below with the text you want to be copied and pasted for everyone who wants to visit your site. And that's it, you can customize the height and width using rows and cols. See example below -

<textarea class="textarea" id="myInput" onclick="myFunction()" rows="5" name="S1" cols="48">YOUR Customize TEXT here. You can also add code Image Code</textarea>