Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Copy to Clipboard buttons for highlighted lines #103

Open
Lms24 opened this issue Dec 4, 2023 · 0 comments
Open

[Feature] Copy to Clipboard buttons for highlighted lines #103

Lms24 opened this issue Dec 4, 2023 · 0 comments

Comments

@Lms24
Copy link

Lms24 commented Dec 4, 2023

What is your idea?

First off, I love the expressive code blocks features 馃槏 Makes code blocks so much more helpful for users!

One idea to take them to the next level: I'd love to be able to add copy to clipboard buttons to individually selected highlighted lines (or blocks).

image

Looking at this example in the screenshot, if I hover over lines 2, 8 or 14-16, individual copy to clipboard buttons would show up and clicking them would only copy the respective line(s).

Why is this feature necessary?

As a user I鈥檓 rarely able to use the copy/paste button on longer code blocks like the one in the screenshot. Usually I only need the highlighted lines and don鈥檛 want the others. Copying the entire thing at this point is more work than manually selecting the highlighted lines.

I think this is especially helpful in situations where you want to instruct people to add a few lines to an already existing function, object, configuration, etc.

Do you have examples of this feature in other projects?

I don't know websites or frameworks that allow for this but I've always wondered why it's not a thing... Maybe I'm missing an obvious UX flaw with this but to me it'd be an awesome feature! So this could be a USP at this point ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant