I have a small WYSIWYG editor built in JavaScript.
It is working by the getrange methode:
const range = window.getSelection().getRangeAt(0); const oldC