JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" value="http://www.test.com" id="url">

JavaScript

var $el = $("#url"),
    url = $el.val();

$el.replaceWith( $("<a />").attr({"href" : url,"target":"_blank"}).html(url) );