1

I am developing an reader app on xamarin for android and ios.I have an html page content and I use the webview to show it up. I want to select the part of text and highligt it.I should be able to store the page so I think if I get the position of selected text I can insert < mark > tag start and end of the text. Also Should I add an item to the menu that opens after a long press?

I use the webviewrenderer for transparent webview so I can change backgorund and text size. How can I do this ?

Example

snowl
  • 11
  • 4
  • You can try to [get the selected string](https://forums.xamarin.com/discussion/174965/how-to-get-tapped-selected-text-or-paragraph-from-a-webview-android-ios) and find them. And there are some native solutions you can find if you search like [highlight-the-selected-text-in-webview-android](https://stackoverflow.com/questions/45993571/highlight-the-selected-text-in-webview-android). – nevermore Oct 30 '20 at 07:57

1 Answers1

0

I solve this problem using Rangy. I added the library and functions and call from app and it works perfectly. This library adds span tag to selected content and so I can store the highligts.

snowl
  • 11
  • 4