JSFiddle - React, Tailwind, and code Playground

HTML

<p class="aa">v2ex</p>

JavaScript

$(".aa").click(function() {
		$(this).on("focus", document.execCommand('selectAll',false,null));
    $(this).attr("contenteditable", true).focus().attr("contenteditable", false);
});