Button to copy codeblock content

Use case or problem

Obsidian code blocks have a very handy “Copy” button in their top-right corner.

Unfortunately, this feature doesn’t seem to currently apply to Obsidian Publish sites (there’s no “Copy” button for code blocks on published sites).

It would be great if support could be added.

My particular use case: I’m an open source author, and in the process of migrating the documentation for several libraries to an Obsidian Publish site. Developer documentation naturally has a lot of code blocks, and making these easy for readers to copy would benefit the users and help motivate other open source authors to likewise consider Obsidian Publish for hosted documentation.

Thanks, cheers!


I support this as well. I’m not a software developer, but I often make notes about how to update or do something on my system, and also include snippets of code or something like BibTeX. Being able to click to copy code blocks would be a welcome improvement.