There is a long text, in which there are lots of types of white spaces. In order to get an array of words out of it I do var words = whole_text.split(/\s+/);
Now I want to get the text after words[124], including all the original white spaces. How would I do that? The reason I do this is to get a character position in my text after a click on the character. Would be happy to hear alternative approaches as well.
` tag with all the text? Is every word in a ``? You seem to be able to find the `chosen word` which implies you are able to distinguish between clicks on different words. A broader picture will help us give you a better solution.
– ManavM Mar 24 '19 at 21:17. All the headlines are also in
. Basically only spans and ps.
– miha64 Mar 24 '19 at 21:21