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.
Unfortunately, activation email could not send to your email. Please try again.

SaveAsHtml for Edit Control

Thread ID:

Created:

Updated:

Platform:

Replies:

125110 Jul 21,2016 11:33 PM Jul 22,2016 10:43 AM Windows Forms 3
loading
Tags: EditControl
Frank Hilton
Asked On July 21, 2016 11:33 PM

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?


Frank Hilton
Replied On July 22, 2016 06:29 AM

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



Vijayalakshmi Roopkumar [Syncfusion]
Replied On July 22, 2016 10:42 AM

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. 


Vijayalakshmi Roopkumar [Syncfusion]
Replied On July 22, 2016 10:43 AM

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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;