JSFiddle - React, Tailwind, and code Playground
by Qwerty_Wasd
HTML
<div id="text" contenteditable="true" >Текст в поле ввода</div>
JavaScript
var el=document.getElementById('text');
el.focus();
el.setSelectionRange(el.value.length,el.value.length);