JSFiddle - React, Tailwind, and code Playground

HTML

<div id='test'>Test</div>
<div id='test1'>Test</div>

JavaScript

$("#test").get(0).contentEditable = "true";
$("#test1").attr('contentEditable',true);



if( $("#test").attr('contentEditable')=='true'){
    $("#test").append(' - Edit ME!')
}

if( $("#test1").attr('contentEditable')=='true'){
    $("#test1").append(' - Edit ME!')
}