JSFiddle - React, Tailwind, and code Playground

by maxofpower

HTML

<div id="story" contenteditable="true"> change this text to see what happens </div>

JavaScript

var content = $('#story').html();
$('#story').blur(function() {
if (content!=$(this).html()){
    alert('change() called.');
    content = $(this).html();
}
});