JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test" contenteditable="true"></div>
JavaScript
// add some text to the editable div including zero space characters
var string = 't' + '\u200B' + '\u200B' +'est' + 'four zero width spaces start here ->' + '\u200B' + '\u200B'+ '\u200B'+ '\u200B' + ' [click here and use the arrow key or backspace to move over the text to the left]' ;
var textnode = document.createTextNode( string );
$( '#test' ).focus();
$( '#test' ).append( string );