JSFiddle - React, Tailwind, and code Playground

HTML

<div id="ce" contenteditable="true">
    Edit this text (just click in it and type). jQuery will have the parent node as target of the DOMCharacterDataModified, while the original event has the actual text node as a target. See <a href="http://bugs.jquery.com/ticket/5539">ticket #5539</a>
</div>
<div id="output"></div>

JavaScript

$(document).ready(
    function ()
    {
        $("#ce").bind("DOMCharacterDataModified", cdatamodified);
    }
  );

function cdatamodified (evt)
{
    $("#output").text(mkOutput(evt.target.nodeType, evt.originalEvent.target.nodeType));
}

function mkOutput(n, on)
{
    return "Target of jQuery event: " + nodeTypeToString(n) + ", target of original event: " + nodeTypeToString(on);
}

function nodeTypeToString (n)
{
    if (n === 1) return "Element";
    if (n === 3) return "Text";
}