<div contenteditable="true">This text is <b>Bold</b> not <i>Italic</i> right?</div>
For instance, if
the text appears in a bold format, but not italic
and the user selects it, how can I determine the exact position or offset of the highlighted selection? I have researched multiple articles on this topic without finding a clear explanation. Thank you.