I am trying to read user-selected text inside an iframe from a different origin or domain.
Actual use-case:
- There is an iframe on my page with content from another domain
- The user highlights some text inside the iframe
- The user then clicks a button on the side (outside of the iframe)
- 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!