JSFiddle - React, Tailwind, and code Playground
HTML
<div id="txtarea" contenteditable="true">Some text</div>
JavaScript
var position = 5, txt = "more ";
var current = $("#txtarea").html();
//alert(current.substring(0, position))
var end = current.substring(position);
var newValue = current.substring(0, position) + txt + end;
$("#txtarea").html(newValue);