You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: