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

Ability to retrieve selection from all environments. #16

Open
4 tasks
pgmichael opened this issue Mar 1, 2020 · 1 comment
Open
4 tasks

Ability to retrieve selection from all environments. #16

pgmichael opened this issue Mar 1, 2020 · 1 comment

Comments

@pgmichael
Copy link
Owner

pgmichael commented Mar 1, 2020

We currently retrieve the selected text from the selection context or the window.getSelection method. Unfortunately, this does not seem to works in certain environment:

  • PDFs
  • Google Docs
  • Text inputs
  • iFrames
@Su-Well
Copy link

Su-Well commented May 24, 2020

If you change line 57 in background.js from selectionContents.textContent; to selectionContents.textContent || window.getSelection().toString(); it will work for text input without affecting existing functionality. It's not very elegant code, so I'll just leave it as a comment here and let you decide how/if you want to add it.

For pdf's it looks like this might work. Not sure about Google docs though.

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

2 participants