How to Add "Copy to Clipboard" in Blogger

 How to Add "Copy to Clipboard" in Blogger


Step 1: Open the Blog Post

  • Open the blog post where you want to add the copy-to-clipboard feature.
  • Provide the blog post link in the video description.

      Add JavaScript (JS) Code

  1. Copy the provided JavaScript (JS) code.
  2. Go to your Blogger Dashboard.
  3. Click on ThemeCustomizeEdit HTML.
  4. Click anywhere in the theme code area.
  5. Press Ctrl + F on your keyboard to open the search box.
  6. Type </head> and press Enter.
  7. Locate the </head> tag and paste the copied JS code right above it.
  8. Click Save.

Step 2: Add the Script Code

  1. Copy the provided script code from the post.
  2. Go to your Edit Template page.
  3. Click anywhere in the theme code area.
  4. Press Ctrl + F and search for </body>.
  5. Locate the </body> tag and paste the script code above it.
  6. Click Save.

Step 3: Add the CSS Code

  1. Copy the provided CSS code from the post.
  2. Go to your Blogger Dashboard.
  3. Click on LayoutTheme DesignerAdvanced.
  4. Select "Add CSS" from the dropdown menu.
  5. Paste the copied CSS code.
  6. Click Save.

Step 4: Add Copy-to-Clipboard HTML Code

  1. Copy the HTML code from the post.
  2. Go to your Blogger Post Editor.
  3. Switch to HTML view.
  4. Paste the copied HTML code where you want the copy-to-clipboard button.

Step 6: Customize the Clipboard Content

  1. Locate the text/code placeholder in the HTML code.
  2. Replace it with your own text or code that you want users to copy.

Step 7: Add a Unique Clipboard Tag

  1. Find the clipboard tag in the HTML code.
  2. Replace it with a unique tag (each copy-to-clipboard box should have a different tag).
  3. Ensure that both the input ID and button reference have the same unique tag.

Step 8: Adjust Clipboard Height (Optional)

  • Modify the rows number in the textarea code to increase or decrease clipboard height.

Step 9: Update & Test

  1. Click Update Post to save changes.
  2. Open the post and test the copy-to-clipboard button.
  3. Verify that it works correctly and is responsive on all devices.

๐ŸŽ‰ Done! You have successfully added a Copy to Clipboard feature to Blogger! ๐Ÿš€



1. Copy This JS Code and Paste it Above close Head Tag in Blogger Theme file


2. Copy This script Code and Paste it Above close Body Tag in Blogger Theme file



3. Copy This CSS and Paste it in Blogger Theme file Go to: Blogger Dashboard -> Layout -> Theme Designer -> Advanced -> Add CSS


4. Copy This Code and Paste it in Your Post You Must Give Unique Tag for Every Different Copy to Clipboard
Remove @ sign from Following code and Add (Left-Pointing Angle Bracket Symbol)
 
Previous Post
Next Post

0 Comments: