ssssota / svelte-exmarkdown

Svelte component to render markdown.
https://ssssota.github.io/svelte-exmarkdown
MIT License
189 stars 6 forks source link

I want to add a copy button in code block, what should I do #35

Closed ryzencool closed 1 year ago

ryzencool commented 1 year ago

In the code block, I want to add a copy action, how can I implement it?

ssssota commented 1 year ago

Thanks for your question!

You can implement like this: https://stackblitz.com/edit/svelte-exmarkdown-code-highlight-with-copy?file=src%2FApp.svelte,src%2FPreWithCopyButton.svelte