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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Text Selection Popper Container Sharing Links #177

Open
arihantverma opened this issue May 28, 2019 · 5 comments
Open

Feature Request: Text Selection Popper Container Sharing Links #177

arihantverma opened this issue May 28, 2019 · 5 comments

Comments

@arihantverma
Copy link

arihantverma commented May 28, 2019

Hey @kentcdodds!

I miss highlighting text in your detailed blogposts on medium. So I thought it'd be cool to be able to highlight text in the blogposts, and show a popper, containing, for example, twitter share icon, which will automatically pick selected text and open twitter box, pre filled with template text.

Using a useTextSelection hook, which would return text and position of the text, which can be consumed for example by react-popper, wired with mousedown, mouseup, shift + keydown and shift + keyup events.

Would you like something like that? I've just started something like that over here (https://codesandbox.io/s/usetextselection-react-hook-wip-g0ksf
), thinking you might.

Reference — https://codepen.io/FezVrasta/pen/YEVrGP

@kentcdodds
Copy link
Owner

I really love the idea! Maybe I'll add it eventually :) Thanks!

@gdad-s-river
Copy link

Can I work on it? I'll raise a PR after I'm done.

@kentcdodds
Copy link
Owner

Sure!

@JacobMGEvans
Copy link
Collaborator

@gdad-s-river Greetings! Just wanted to follow up on the status of this work 😄

@arihantverma
Copy link
Author

@JacobMGEvans I never properly worked in it and forgot about it 😅 . I plan on working on it in Feb and will update here

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

No branches or pull requests

4 participants