# How to add Copy to Clipboard Icon in prismjs?

**URL:** <https://forum.ghost.org/t/how-to-add-copy-to-clipboard-icon-in-prismjs/32693>\
**Category:** Themes\
**Created:** [September 10, 2022, 12:12pm UTC](https://forum.ghost.org/t/how-to-add-copy-to-clipboard-icon-in-prismjs/32693 "2022-09-10T12:12:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anirudh\_Ekbote](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/anirudh_ekbote/32/19415_2.png) [@Anirudh\_Ekbote](https://forum.ghost.org/u/Anirudh_Ekbote)\
**Post date:** [September 10, 2022, 12:12pm UTC](https://forum.ghost.org/t/how-to-add-copy-to-clipboard-icon-in-prismjs/32693/1 "2022-09-10T12:12:10Z")

</div>

I followed this article - [A complete guide to code snippets](https://ghost.org/tutorials/code-snippets-in-ghost/)

I was able to setup the code block and copy to clipboard button.

But it looks ugly, compared to Ghost styling.

 ![Screenshot 2022-09-10 at 5.22.23 PM](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/0/7/07f18b844b6847770278eb71785bae2505c0ceec.png)

Here are my settings in prismjs - [prismjs settings](https://prismjs.com/download.html#themes=prism-okaidia&languages=css+clike+javascript+css-extras&plugins=autolinker+custom-class+show-language+inline-color+autoloader+toolbar+copy-to-clipboard+match-braces)

Does anyone know the settings and color codes for replicating Ghost’s code block design with the icon & code type showing by default?

---

<div class="post-metadata">

**Author:** ![Theo](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/theo/32/2432_2.png) [@Theo](https://forum.ghost.org/u/Theo)\
**Post date:** [December 3, 2022, 7:39pm UTC](https://forum.ghost.org/t/how-to-add-copy-to-clipboard-icon-in-prismjs/32693/2 "2022-12-03T19:39:28Z")

</div>

Hi Anirudh,  
It looks like no one responded to your question.  
I found this Ghost [article](https://ghost.org/tutorials/code-snippets-in-ghost/) helpful in adding color to my snippets.  
I used method one and injected the suggested code into my header’s and footer’s and it works great!  
One thing to note is, your snippets won’t have color in preview, only when you view the actual post.  
I hope this helps!  
Kind regards,  
Ted
