JSFiddle - React, Tailwind, and code Playground

HTML

<table>
    <tr>
        <td>
       abc
       <a href="#" class=".myLinkClass">edit</a>
   </td>
    </tr>
</table>

JavaScript

$("td").contents().filter(function() {
    return !$(this).is("a");
}).remove();