https://phuoc.ng/collection/html-dom/move-the-cursor-to-the-end-of-a-content-editable-element/
const moveCursorToEnd = () => {
const range = document.createRange();
const selection = window.getSelection();
range.setStart(contentEle, contentEle.childNodes.length);
range.collapse(true);
selection.removeAllRanges();
selection.addRange(range);
};