JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test" contenteditable="true">test test set set setset </div>
<div id="hello">HELLO</div>

CSS

#test {
    height: 100px;
    width: 100px;
    border: solid 1px #000;
}

JavaScript

$( "#hello" ).hide();  
  
    $(this).click(function() {
    if ($(this).attr("contentEditable") == "true") {
     	    $( "#hello" ).show();
        } else {
	        $( "#hello" ).hide();  
        }    
    });