JSFiddle - React, Tailwind, and code Playground

HTML

<div class="changeable" contenteditable="true"> Click this div to edit it </div>

JavaScript

var contents = $('.changeable').html();
    $('.changeable').blur(function() {
       if (contents!=$(this).html()){
     alert('Handler for .change() called.');
          $(".Apple-tab-span").remove();
           contents = $(this).html();
           contentsTx = $(this).text();
           alert(contentsTx);
           
       }
    });