JSFiddle - React, Tailwind, and code Playground

HTML

<div id="text">
Lemon drops pie soufflé cotton candy marzipan chocolate.
Macaroon donut marshmallow croissant I love chocolate cake sesame snaps cotton candy cheesecake.
I love brownie tiramisu jelly chupa chups cupcake marshmallow cotton candy.
Gummies jelly beans applicake I love caramels candy canes icing.
Oat cake cupcake oat cake.
Fruitcake danish I love carrot cake muffin marzipan.
Chocolate bar marzipan gummi bears cheesecake dessert cheesecake halvah liquorice I love.
Soufflé cake tootsie roll fruitcake tootsie roll lemon drops applicake macaroon.
Tart candy biscuit I love candy sesame snaps.
Jelly gummi bears sesame snaps.
Candy sesame snaps donut halvah.
Ice cream biscuit pastry ice cream jelly beans danish.
</div>

CSS

span:hover { background:#DDD }

JavaScript

$(function(){
  var paragraph = $("#text").text();
  var lines = paragraph.split(/\r?\n/);
  $("#text").text('');
  $.each(lines,function(index,elem){
    if (elem != ''){
      $("#text").append('<span>'+elem+'</span><br/>');      
    }
  });
});