0:00
Hello everyone, welcome to K2 Bloggin and in this video I will show you how you can enable
0:04
copy to clipboard button in your blogger website. So here I have add a blog code and here I have a copy to clipboard button
0:14
So let me just open a notepfade file and let me just click on copy to clipboard
0:20
Now let's open the notepad file and let's paste this. And here as you can see the content is copied by just clicking the button
0:30
Now let me just copy the second content. So I will click on this and let me just paste it here
0:39
So as you can see, you can add a click to copy button in your website
0:45
So for this you have to assign a ID to the element
0:49
So you can use this copy to clipboard button in any element like code box, blog code, paragraph dip
0:57
So let me just show you how you can implement it in your book. blogger website
1:01
So for this, let me just go to the blogger dashboard and let's create a new post
1:17
And let me just switch to Compose View and let's copy a content from here and let's paste
1:24
it here. Now let me just select this and let me just
1:29
make it a block code. Now let's click on preview button and as you can see the default block code in this theme looks
1:41
like this. So you have to add a copy to clipboard button just below the block code
1:48
So for this we have to go to the HTML view section and let me just click on Enter and we
1:55
have to add the button code. So here I will copy the button
1:59
the code from here and let me just paste it here So this is basically the button code and here I have implemented a SBG icon So here as you can see let me just refresh this first And here as you
2:16
can see, this is the SBG icon. So you can remove this SVG icon if you want to display a simple
2:23
button and this is the CSS code for this button and this is the script that will
2:30
help you add the copy to clipboard button. So here we have add a ID, my input, so you have to add that IBD
2:39
So let me just copy this ID from here and let's go to the block code and here I will add
2:47
that ID. So I will type ID equal to and in the double code I will paste that ID and let's close
2:58
the double code. Now the ID is added to the block code
3:03
Now the copy to clipboard button will work. So let me just publish this first and let me just open it in a new tab
3:15
Okay now the copy to clipboard button is added. Let me just click on copy and the text is copied in my clipboard
3:23
Now I can paste it here. Now let me just copy a different text from here to the clipboard so that it will override
3:31
the previous one. Now let's click on button again and let's paste it here
3:39
Okay, now the copy to clipboard button is added. Now let's check how you can add multiple buttons in the website
3:49
So to add multiple button, let me just go to the blog post and let's check how you can add multiple button
3:56
Let me just create another block code So I will copy the block code from here and let paste it here And I will change the content a little bit from here And here I will change the ID So here I will change the ID to my input 1
4:20
And let's take the button after the first block code and then add the button after the second
4:29
block code. Now to work the new copy to clipboard button, we have to add a
4:35
second script. So here I will just copy the script again and paste it like this and here I will
4:44
change the ID. So here I will change the ID to my input 1. So this is the ID that we added
4:52
in the second block code. Now you have to change the button ID. So here let me just
5:00
change the button ID so here change the button ID to K2 button 1 and then I will add the
5:09
button ID in the script like this so you have to change the input ID in the block
5:18
code and then you have to change the button ID in the second button and you have to
5:24
paste the script again so let me just update this and let's refresh this
5:30
this page. Okay, now the second block code is added. Now let me just click on Copy to Clickboard button
5:39
Now let's paste it here. And as you can see, it is working
5:47
But there is one mistake here. When I click on the copy button, it will change the text copied in the fast button
5:56
So here we have to change another ID. So here as you can see, this is the button ID
6:02
So here I have to change to K to button one so that it will change the text
6:08
So here you can change the button text like text copied or the text is copied to clipboard or code copied So let me just update this
6:22
And let's refresh this page. Now let me just click on copy it and as you can see the text changed to text copied
6:31
So for this you have to change the button ID here and then change the button ID in this place
6:38
So you have to change the button ID in this place. in this two place and then you have to change the input ID here in the block code
6:47
I hope you got the idea how the copy to clipboard button work and how you can implement it
6:53
in your blogger website. I know this is a little bit tricky but you can easily implement this in your website
7:01
You just need to add the ID. So just copy the ID from the script and then add the ID in this way
7:09
after the block code. And if you don't want to add that SBG icon, then let me just remove that SBG code from here
7:21
Now the button code will look like this. Now let me just update this
7:28
And let's refresh this page and as you can see the copy to clipboard button is gone
7:33
Simply just copy button is showing. So let me just click on this and as you can see the text is done. changed
7:40
So in this way you can further customize this and you can also change the button color
7:45
So here I have added the button K to copy button. So here you can change the color
7:51
So this is the text color and this is the background color
7:55
And you can also change the font weight or size of the button
8:01
And if you have any doubt regarding this, then you can ask me in the comment section
8:05
and I will also publish a blog post where I will explain how the button works
8:09
And if this video helps, then makes sure to hit the like button so that it motivates me to
8:14
keep creating more content like this. And I will see you in the next video