where "Lorem Ipsum" and "text of the printing" were both highlighted. I have the javascript working which injects the

<mark>

tags in the correct place, now I need to find a way to essentially recreate the highlighted regions when the user logs back on. One way is to save the entire html element with the

<mark>

tags, but since these paragraphs can get very long, this seems extremely inefficient to me, especially when you consider that many users will use this and you'll have to replicate so much content for each user.

I thought maybe another way is to save the indices of where the

<mark>

tags occur in the string, but this sounds tricky because the indices change once you insert

<mark>

tags into the string and the (very) original saved string doesn't have any html in it (in the database).