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
- Copy the provided JavaScript (JS) code.
- Go to your Blogger Dashboard.
- Click on Theme → Customize → Edit HTML.
- Click anywhere in the theme code area.
- Press Ctrl + F on your keyboard to open the search box.
- Type
</head>and press Enter. - Locate the
</head>tag and paste the copied JS code right above it. - Click Save.
Step 2: Add the Script Code
- Copy the provided script code from the post.
- Go to your Edit Template page.
- Click anywhere in the theme code area.
- Press Ctrl + F and search for
</body>. - Locate the
</body>tag and paste the script code above it. - Click Save.
Step 3: Add the CSS Code
- Copy the provided CSS code from the post.
- Go to your Blogger Dashboard.
- Click on Layout → Theme Designer → Advanced.
- Select "Add CSS" from the dropdown menu.
- Paste the copied CSS code.
- Click Save.
Step 4: Add Copy-to-Clipboard HTML Code
- Copy the HTML code from the post.
- Go to your Blogger Post Editor.
- Switch to HTML view.
- Paste the copied HTML code where you want the copy-to-clipboard button.
Step 6: Customize the Clipboard Content
- Locate the text/code placeholder in the HTML code.
- Replace it with your own text or code that you want users to copy.
Step 7: Add a Unique Clipboard Tag
- Find the clipboard tag in the HTML code.
- Replace it with a unique tag (each copy-to-clipboard box should have a different tag).
- 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
- Click Update Post to save changes.
- Open the post and test the copy-to-clipboard button.
- 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
3. Copy This CSS and Paste it in Blogger Theme file
Go to: Blogger Dashboard -> Layout -> Theme Designer -> Advanced -> Add CSS
Remove @ sign from Following code and Add (Left-Pointing Angle Bracket Symbol)

0 Comments: