# Adding copy button for Code block

**URL:** <https://forum.ghost.org/t/adding-copy-button-for-code-block/47953>\
**Category:** Using Ghost\
**Created:** [June 7, 2024, 5:22am UTC](https://forum.ghost.org/t/adding-copy-button-for-code-block/47953 "2024-06-07T05:22:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sudarshan](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@Sudarshan](https://forum.ghost.org/u/Sudarshan)\
**Post date:** [June 7, 2024, 5:22am UTC](https://forum.ghost.org/t/adding-copy-button-for-code-block/47953/1 "2024-06-07T05:22:35Z")

</div>

Hi All,

I am new to Ghost and am using the cloud hosted option. I am looking to add a copy button to my code snippets, How can i do this by Code Injection? I am using the Code Injection method to add syntax highlighting.

---

<div class="post-metadata">

**Author:** ![brightthemes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/brightthemes/32/25099_2.png) [@brightthemes](https://forum.ghost.org/u/brightthemes)\
**Post date:** [June 8, 2024, 1:56pm UTC](https://forum.ghost.org/t/adding-copy-button-for-code-block/47953/2 "2024-06-08T13:56:57Z")

</div>

Did you use Prism? The copy to clipboard is a separate plugin which in turn depends on the toolbar plugin, so you need both of those. Depending o how and from where you added the main script, you should be able to find these plugins to. For example [cdnjs](https://cdnjs.com/libraries/prism/1.29.0)
