Highlighting Dummy Text

90% of the time, I am creating mockups of sites using Lorem Ipsum text while waiting for copy to come in, I wrote a little javascript snippet to highlight the forementioned text. Thought I would share.

var cl= document.getElementsByTagName('p');
for (var i = 0, len = cl.length; i < len; ++i) {
if(cl[i].innerHTML.indexOf("Lorem") !== -1) {
  cl[i].prepend("Wording Required: ");

Good morning @richards . What would be the usage scenario for this script? Sounds like it should be interesting to use, but I don’t understand the concept of what to use it for. (not big with Javascript yet lol)

Hi Jo, basically any paragraph with Lorem in the contents get the class text-danger added to it to turn it red, highlighting that the text needs updating.

Helps the client, and me, proof the site for any left offer dummy text.

One thing though, I did have a client turn around and say they liked the red text😔 no accounting for taste🙂

Oh ok, that’s pretty slick. Thanks much for sharing that! :slight_smile: