Highlight markdown text in android

16 Views Asked by At

I develop an android application that show texts. texts is included links of image for show some icon in text. i want create a feature to user can highlight some part of text. after highlight text send to server and when user back to app, text get from server. for show image in text, I use Markwon. and server send a text inclueded image by markdown symbole.
I don't know how can handle highlight text and send to server and after that parse highlight text.
when user select a part of text, how can find position of that in markdown text? for example:
this is my markdown text:

This is My Dog ![](https://www.princeton.edu/sites/default/files/styles/1x_full_2x_half_crop/public/images/2022/02/KOA_Nassau_2697x1517.jpg?itok=Bg2K7j7J). do you like it?

when user select "do you", in markdown text is positon 140 to 146 but in main text is 15 to 21. how can implement that?
please explain how can implement this feature in server and client side.

0

There are 0 best solutions below