JSFiddle - React, Tailwind, and code Playground

by davehol

HTML

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Calibri;font-size:12pt;color:#EEDC00;margin:15pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Center">
RMIT Classification: Trusted<br>
</p>
<br>
<div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Melanie Fitzmaurice &lt;[email protected]&gt;<br>
<b>Sent:</b> Tuesday, 12 September 2023 4:33 PM<br>
<b>To:</b> David Holinger &lt;[email protected]&gt;<br>
<b>Subject:</b> Fw: Some feedback has been posted for RMIT</font>
<div>&nbsp;</div>
</div>
<style type="text/css" style="display:none">
<!--
p
	{margin-top:0;
	margin-bottom:0}
-->
</style>
<div dir="ltr">
<p align="Center" style="font-family:Calibri; font-size:12pt; color:#EEDC00; margin:15pt; font-style:normal; font-weight:normal; text-decoration:none">
RMIT Classification: Trusted<br>
</p>
<br>
<div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> [email protected] &lt;[email protected]&gt;<br>
<b>Sent:</b> Tuesday, 12 September 2023 3:16 PM<br>
<b>To:</b> RMIT Apps &lt;[email protected]&gt;<br>
<b>Subject:</b> Some feedback has been posted for...

JavaScript

var aTags = document.getElementsByTagName("p");
var searchText = "reported the following";
var found;
var str;

for (var i = 0; i < aTags.length; i++) {
str = aTags[i].textContent.toString();
//console.log(str);
 if (str.indexOf("reported") >-1) {
  found = aTags[i].textContent;
   console.log(aTags[i].textContent);
    break;
  }
}