Mark text with Javascript

Asked

Viewed 224 times

1

I would like to create a text tag on an HTML page made by Javascript. I made a method that I can get the initial and final points of a selection made by the user and save them on Android, but I have no idea how to create HTML text markup after the page is loaded again. I know I have to pass the parameters of the initial and final point of the text, but I do not get the syntax.

I still don’t understand the use of addRange shown in this example http://help.dottoro.com/ljcpcpnt.php

In this tutorial is explained how to create the text markup selected by the user by changing his style: http://tech.pro/tutorial/1075/javascript-highlighting-selected-text

  • it’s important to show what code you’ve been doing for us to help and point out where it’s right or wrong... use jsfiddle.net

  • Hello friend, I don’t have a code for this because I don’t have much knowledge in javascript.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.