Is there a way to get character offset from a position?
I have a box that looks like this –

I want to parse it character by character but I want to detect when it is superscript (which I achieved by setting SelectionCharOffset to 10
What I have is a loop that looks like this so I can acces the position with i
for (int i = 0; i < Text1.TextLength; i++) {
//I can use things here like Text1.Text[i]...
}
The same way you achieved superscript.
Use the SelectionCharOffset property (along with
SelectionStartandSelectionLengthto select one character at a time) and see if its a positive number (since positive represents superscript and negative represents subscript).