We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SaveAsHtml for Edit Control

I am using the EControl as an html Editor, but not for actual web pages, but a Lyrics/Chord viewer using the WebBrowser control.
I am formatting the lyrics/chords using regular html tags (h1, p, br etc etc)

I don't care for the output of the "SaveAsHtml" directly from the Econtrol because it isn't web standard.
So, I want to be able to re-write the Editor1.Text string and apply my own html/css in code.
OR if I can figure out how to save the line-breaks when saving the output

But as I am doing it (most works), I am needing to know where the <br> (blank lines) code needs to go.

However, in the editor1.text string there are no indications of where the text string is.
It looks like this... (after saved) - no editing yet

Kingdom ComeColin EdgeKey: [F]This is the lyrics

When it should look like this (as it appears in the editor at runtime)...

Kingdom Come
Colin Edge
blank
Key: [F]
blank
This is the lyrics

So, how do I get the blank lines? (marked in red above)

Does this make sense?


3 Replies

FH Frank Hilton July 22, 2016 10:29 AM UTC

Figured it out!

Dim i As Integer
Dim ourStr As String = ""
Dim outputStr As String = ""
Dim br As String = "<br>"
For i = 1 To editLyrics.PhysicalLineCount
    ourStr = editLyrics.GetLineText(i)
    If editLyrics.GetLineText(i) = "" Then
        ourStr = ourStr & br
    End If
    outputStr = outputStr + ourStr
Next
MsgBox(outputStr)
End Sub




VR Vijayalakshmi Roopkumar Syncfusion Team July 22, 2016 02:42 PM UTC

Hi Frank, 
We are glad to know that the issue has been resolved at your end. Please let us know if you need any further assistance on this. 
Regards, 
Vijayalakshmi V.R. 



VR Vijayalakshmi Roopkumar Syncfusion Team July 22, 2016 02:43 PM UTC

Hi Frank, 
We are glad to know that the issue has been resolved at your end. Please let us know if you need any further assistance on this. 
Regards, 
Vijayalakshmi V.R. 


Loader.
Up arrow icon