Site Map | About Us | Contact Us  
 The same content in Microsoft HTML help file format is included in the download package.

Working with Editor Contents

Use Html property to get or set the editor contents. For example, the following code calls SaveText function (hypothetical, not provided by the Editor) to save the new HTML when Button1 is clicked:

[C#]
private void Button1_Click(object sender, System.EventArgs e)
{
    SaveText(Editor1.Html);
}
[Visual Basic.NET]
Private Sub Button1_Click(sender as Object, _
    e as System.EventArgs) Handles Button1.Click
{
    SaveText(Editor1.Html)
}

The following code displays it back to the user:

[C#]
Panel1.Text = Editor1.Html;
[Visual Basic.NET]
Panel1.Text = Editor1.Html

Note: If HtmlBodyCssClass has been used on the editor, you may wish to apply the same style on the container element, for example, on a Panel control that you may use to host the contents when displaying the text back to the user.


Direct link to this topic