JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<button type="button" class="center" id="link">Link</button>
<button type="button" class="center" id="unlink">Unlink</button>
<div style="border: 1px solid;" contenteditable>
JavaScript
$('#link').click(function() {
var linkURL = prompt("Enter the URL for this link:", "http://");
document.execCommand("CreateLink", false, linkURL);
updateInput()
});
$('#unlink').click(function() {
document.execCommand("UnLink", false, null);
updateInput()
});