Support simple backticks with copy feature #2873
mseibert
started this conversation in
Feature Requests
Replies: 1 comment
-
Eh, I understand. That's probably nothing anyone would want in an Astro environment. #hm |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What version of
starlight
are you using?0.5.0
What is your idea?
Today you can copy code when using three backticks:
When you only use
one backtick
there is a highlighting but no support for copying. I would want to offer this support e.g. on hover over this area.Why is this feature necessary?
All documentation is using a lot of stuff that needs to be copy and pasted into the documented software. It's not always blocks of codes. Often it's only a variable or a parameter. It would be bloated to always use a big box in such circumstances.
If you want to make the copy help less intrusive you could activate the copy button only after half a second of hovering. So that it does not appear inadvertently when the user is not searching for a copy feature.
Do you have examples of this feature in other projects?
I have not seen this implemented yet.
Participation
Beta Was this translation helpful? Give feedback.
All reactions