0

My plan is to assign the selected text to a string variable. But for now I'd like to simply print it in real time. Is there a way to retrieve and assign it in real time?

I've tried to use the answers from the below link and couldn't do much:

How do I get the selected text from a WKWebView from objective-C

Thanks in advance

Ungo2021
  • 5
  • 2
  • Perhaps [this](https://stackoverflow.com/questions/34866390/copy-selected-text-with-swift) will help... – DPrice Oct 23 '20 at 05:20
  • Does this answer your question? [How do I get the selected text from a WKWebView from objective-C](https://stackoverflow.com/questions/50846404/how-do-i-get-the-selected-text-from-a-wkwebview-from-objective-c) – LoGoCSE Oct 23 '20 at 07:02
  • @DPrice I'll look into that a bit more and see if it works or not – Ungo2021 Oct 23 '20 at 07:32
  • @LoGoCSE I tried to implement it but I couldn't get it to print the selected text in real time. I don't how to print using "func userContentController" from the solution. – Ungo2021 Oct 23 '20 at 07:35

0 Answers0