JSFiddle - React, Tailwind, and code Playground

HTML

<div id="counter">A dot for each click: </div>
<div id="editable" contenteditable="true">Some text, try to partially mark it</div>

JavaScript

$("#editable").click(function() {
    $("#counter").append(".");
});