question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Text Selection Popper Container Sharing Links

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kentcdoddscommented, May 28, 2019

Sure!

1reaction
kentcdoddscommented, May 28, 2019

I really love the idea! Maybe I’ll add it eventually 😃 Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Click event suddenly stopped working (Reactstrap / Popper.js ...
This code opens a modal that contains some buttons and clicks on them. The modal is provided by Reactstrap (8.9.0). it('can discard and...
Read more >
How to Build a Dynamically Positioned Popover ... - YouTube
The popper.js library is a powerful positioning engine for tooltips and popovers. ... Share your empowering knowledge, skills, experience, ...
Read more >
How to set the width of material ui Popper to its container's ...
I don't want the popper to go out of container in x direction but adjust it's width to the width of it's container....
Read more >
Tippy.js - Tooltip, Popover, Dropdown, and Menu Library
Tippy.js is the complete tooltip, popover, dropdown, and menu solution for the web, powered by Popper. It provides the logic and optional styling...
Read more >
How to Build a Dynamically Positioned ... - Elegant Themes
The popper.js library is a powerful positioning engine for ... we are going to rely on some custom CSS and Javascript for the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found