JSFiddle - React, Tailwind, and code Playground

HTML

<div class="contentBox"> 
      <p>I have some content that is good to read</p>
   </div>

CSS

span{
    color:red;
}

JavaScript

var after=24;
var html = $(".contentBox p").html();
html = html.substring(0, after) + "<span>" + html.substring(after)+"</span>";
$(".contentBox p").html(html);