JSFiddle - React, Tailwind, and code Playground
HTML
<div class="contentBox">
<p>I have some content that is good to read</p>
</div>
CSS
span{background-color:red;}
JavaScript
$(function(){
$('.contentBox p').each(function(){
var text = $(this).text();
var first = text.substring(0,26);
var second = text.substring(26,text.length);
$(this).html(first + '<span>' + second + '</span>');
});
});