Now the problem is I cant replace the superscript rtf to html. I tried till this stage:
Expand|Select|Wrap|Line Numbers
- Dim k As String = (TextBox1.Rtf)
- Dim intfs17 As Integer = InStr(k, "\fs17", CompareMethod.Text)
- 'fs17 is the last string in the rtf header i blv
- If intfs17 > 0 Then
- 'replace till it now. erase till it all.
- Dim b As New StringBuilder
- b.Append(k)
- b.Remove(0, intfs17 + 4) 'removes all the stuff from first char to the word intfs17
- b.Replace("\par", "")
- b.Replace("}", "")
- b.Replace("\up4", "") 'non superscripts or ordinary words
- '****************************
- 'NOw here I remain with a string that contains words with superscript format. E.g. html wise <sup>a</sup>bc
- and in rtf wise it is a\up0 bc
- 'I thot of the following line but it is obviously going to hog the program very much
- k = b.ToString
- Dim i As Integer = 0
- Dim c As Integer = 0
- For i = k.Length - 1 To 0
- If k.Substring(i, 4) = "\up0" Then 'we ve a super script
- c = i + 4
- 'stuck!
- End If
- Next
- End If
1. How can I replace \up0 with the right html superscripting?
2. for each char superscripted, rtf separates using a single space. How would i differ that from spaces i am going to use to separate the entered words?
Any any help is greatly appreciated!