JSFiddle - React, Tailwind, and code Playground

HTML

<div contenteditable="true">This is an <a name="anker">anchor</a>. And this is a <a href="#">normal hyperlink</a>. Please try to select them and then press the "Unlink" button.</div>

<input type="button" id="btn" value="Unlink">

CSS

a { color:Blue; cursor:hand !important!; }
input { width:60px; margin-top:10px;}

JavaScript

$(document).ready(function() {    
    $('#btn').click(function() {
        document.execCommand("unlink", false, false);
    });
});