Any copy to clipboard plugin for blogger?


Hey there everyone!

I am in the search for a copy to clipboard plugin for blogger.

if a user clicks on copy button then the text should be saved to the clipboard for pasting later

Does blogger support this functionality?

if so, how can I achieve this one?

thanks in advance SamaraSsr


I have not used any clipboard plugin before but use this javascript

HTML Markup

<textarea id="getresult"></textarea>

JAVASCRIPT Code to Copy Function

    var copyTextareaBtn = document.querySelector('.js-textareacopybtn');

copyTextareaBtn.addEventListener('click', function(event) {
  var copyTextarea = document.getElementById("getresult");;

  try {
    var successful = document.execCommand('copy');
    var msg = successful ? 'successful' : 'unsuccessful';
    console.log('Copying text was ' + msg);
  } catch (err) {
    console.log('unable to copy');

You check this working version here