0

I am trying to read user-selected text inside an iframe from a different origin or domain.

Actual use-case:

  1. There is an iframe on my page with content from another domain
  2. The user highlights some text inside the iframe
  3. The user then clicks a button on the side (outside of the iframe)
  4. The text is then saved and highlighted within the iframe

I took a look at this page about circumventing same-origin policy, but I am not sure which method would be suitable since I am particularly inexperienced in this area. I am looking for a little guidance, thanks in advance!

Community
  • 1
  • 1
adrianmcli
  • 1,956
  • 3
  • 21
  • 49

0 Answers0