Skip to main content
.NET Framework 4.5.2+

HtmlDocumentExporterOptions Class

Contains options to export the document in HTML format.

Namespace: DevExpress.XtraRichEdit.Export

Assembly: DevExpress.RichEdit.v22.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core


public class HtmlDocumentExporterOptions :


Use the HtmlDocumentExporterOptions class object in the following members:

For a list of supported HTML tags, refer to the following help topic: HTML Tag Support.


The following code snippet illustrates how to obtain HTML text using the SubDocument.GetHtmlText method specifying export options with the HtmlDocumentExporterOptions object.

View Example

    frmBrowser myBrowser = new frmBrowser();
    DevExpress.XtraRichEdit.Export.HtmlDocumentExporterOptions myExportOptions =
        new DevExpress.XtraRichEdit.Export.HtmlDocumentExporterOptions();
    myExportOptions.Encoding = System.Text.Encoding.Unicode;

    if (this.richEditControl.Document.Selection.Length > 0) {
        DevExpress.XtraRichEdit.API.Native.DocumentRange selection = richEditControl.Document.Selection;
        DevExpress.XtraRichEdit.API.Native.SubDocument doc = selection.BeginUpdateDocument();
        myBrowser.SetHtml(doc.GetHtmlText(selection, null, myExportOptions));
    else {
        myBrowser.SetHtml(richEditControl.Document.GetHtmlText(richEditControl.Document.Range, null, myExportOptions));


The following code snippets (auto-collected from DevExpress Examples) contain references to the HtmlDocumentExporterOptions class.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.


See Also