[feature] copy button plugin
o-az opened this issue · comments
omar commented
UPDATE
You can already use the copy button plugin. Install through https://jsr.io:
npx jsr add @rehype-pretty/transformers
pnpm dlx jsr add @rehype-pretty/transformers
bunx jsr add @rehype-pretty/transformers
yarn dlx jsr add @rehype-pretty/transformers
-
API docs: https://github.com/rehype-pretty/rehype-pretty-code/blob/master/packages/transformers/README.md
-
Code examples: https://github.com/rehype-pretty/rehype-pretty-code/tree/master/examples
-
Live examples:
- Astro https://rehype-pretty-example-astro.pages.dev
- React Server Components https://rehype-pretty.pages.dev/rsc
- SvelteKit https://rehype-pretty-example-svelte.pages.dev
Soon it will be published on npm too :)
Jhagas Hana Winaya commented
Take a look at this Shiki Transformer
https://github.com/joshnuss/shiki-transformer-copy-button