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

Add getSelectedText to amp-bind #11867

Closed
FadySamirSadek opened this issue Oct 30, 2017 · 7 comments
Closed

Add getSelectedText to amp-bind #11867

FadySamirSadek opened this issue Oct 30, 2017 · 7 comments

Comments

@FadySamirSadek
Copy link

What's the issue?

There is currently no way to get the text highlighted by the user in anyway currently in amp

@dvoytenko
Copy link
Contributor

/to @choumx ptal

@dreamofabear
Copy link

@FadySamirSadek Thanks for filing this issue. What's the use case you're looking to support with this?

@FadySamirSadek
Copy link
Author

I wanted to implement a tooltip feature like what is in medium where users can highlight a piece of text then they will have the option to share it , bookmark it or do anything with it . But currently there is no way to do that in amp and i think this will enhance the user experience so much on a lot of websites.

@dreamofabear
Copy link

One way to do this would be add a new AMP event that fires when highlighted text changes:

<p on="highlight:my-tooltip.toggleVisibility">Some highlightable text</p>

In this use case, would the tooltip also need the current mouse position?

@ampprojectbot ampprojectbot added this to the New FRs milestone Nov 6, 2017
@ampprojectbot
Copy link
Member

This issue hasn't been updated in awhile. @choumx Do you have any updates?

1 similar comment
@ampprojectbot
Copy link
Member

This issue hasn't been updated in awhile. @choumx Do you have any updates?

@stale
Copy link

stale bot commented Dec 22, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

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