# Themes with Copy to clipboard button

**URL:** <https://zola.discourse.group/t/themes-with-copy-to-clipboard-button/730>\
**Category:** Support\
**Created:** [January 1, 2021, 7:01pm UTC](https://zola.discourse.group/t/themes-with-copy-to-clipboard-button/730 "2021-01-01T19:01:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![asubmani](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@asubmani](https://zola.discourse.group/u/asubmani)\
**Post date:** [January 1, 2021, 7:01pm UTC](https://zola.discourse.group/t/themes-with-copy-to-clipboard-button/730/1 "2021-01-01T19:01:19Z")

</div>

I am looking for zola themes that have a “Copy to clipboard button” for code snippets  
Looking for something similar to mdbook [https://rust-lang.github.io/mdBook/cli/index.html](https://rust-lang.github.io/mdBook/cli/index.html)

Anyone knows of existing themes that have this feature? I need this for my technical documentation

---

<div class="post-metadata">

**Author:** ![Roman](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Roman](https://zola.discourse.group/u/Roman)\
**Post date:** [January 1, 2021, 7:55pm UTC](https://zola.discourse.group/t/themes-with-copy-to-clipboard-button/730/2 "2021-01-01T19:55:42Z")

</div>

You can add it for any theme, it’s the JS library [https://clipboardjs.com/](https://clipboardjs.com/)

---

<div class="post-metadata">

**Author:** ![asubmani](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@asubmani](https://zola.discourse.group/u/asubmani)\
**Post date:** [January 1, 2021, 8:42pm UTC](https://zola.discourse.group/t/themes-with-copy-to-clipboard-button/730/3 "2021-01-01T20:42:50Z")

</div>

> [@Roman](#):
>
> or any theme, it’s the JS library

Thank you, will follow the docs on extending an existing theme and add it.

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [January 2, 2021, 8:21am UTC](https://zola.discourse.group/t/themes-with-copy-to-clipboard-button/730/4 "2021-01-02T08:21:39Z")

</div>

Yep, it would require JS so very unlikely to be bundled with Zola.

---

<div class="post-metadata">

**Author:** ![dertuxmalwieder](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/dertuxmalwieder/32/336_2.png) [@dertuxmalwieder](https://zola.discourse.group/u/dertuxmalwieder)\
**Post date:** [January 2, 2021, 9:37am UTC](https://zola.discourse.group/t/themes-with-copy-to-clipboard-button/730/5 "2021-01-02T09:37:34Z")

</div>

You don’t need to do that anymore.

> **[Copy to Clipboard using JavaScript](https://www.jasongaylord.com/blog/2020/05/21/copy-to-clipboard-using-javascript)**
>
> As browsers have evolved over the years, security has tightened and the ability to perform certain actions has changed. Browsers have long supported a new, standard API, called ClipboardEvent. However, most browsers did not widely support Clipboard...
