title: Marking up text by character index
body: <p>I have a block of plain text, and a list of start/end offsets for things I want to highlight. For example:</p>
  <pre><code>Hello StackOverflow, how are you?
  
  [
    {
      start: 6,
      end: 19,
      desc: &quot;A website where people can get help with programming questions&quot;
    },
    ...
  ]
  </code></pre>
  <p>I want to add &lt;span&gt; tags into the text at the correct point, so that I can add a title onto the span with the description. Is there a library or easy approach to doing this using Javascript (specifically within the React framework, but I don't think that should make a difference).</p>