JSFiddle - React, Tailwind, and code Playground

by Nicolas PUJOL

HTML

<div class="editable">test<span class="not-editable">dfdf</span></div>

CSS

.editable {
    width: 300px;
    height: 200px;
    border: 1px solid #ccc;
    padding: 5px;
}
.not-editable {
  color:red;
  
}

JavaScript

$('.editable').each(function(){
    this.contentEditable = true;
});
$('.not-editable').each(function(){
    this.contentEditable = false;
});