Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

HtmlExporter Class

Represents an object used to export the document content in HTML format.

Namespace: DevExpress.XtraRichEdit.Export.Html

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

NuGet Package: DevExpress.RichEdit.Core

#Declaration

public class HtmlExporter :
    HtmlExporterBase,
    IHtmlExporter

#Remarks

The HtmlExporterBase.Export method of the HtmlExporter object is used to accomplish the export task, as illustrated in the following code snippet:

View Example

using DevExpress.XtraRichEdit.Export;
using DevExpress.XtraRichEdit.Export.Html;
using DevExpress.XtraRichEdit.Commands;
using DevExpress.Office.Services;
    private void ExportHtml(out string stringHtml, HtmlExporter exporter, string fileName) {
        stringHtml = String.Empty;
        HtmlDocumentExporterOptions options = new HtmlDocumentExporterOptions();
        options.ExportRootTag = htmlExportType;
        options.CssPropertiesExportType = cssExportType;
        options.TargetUri = Path.GetFileNameWithoutExtension(fileName);
        exporter = new HtmlExporter(this.richEditControl1.Model, options);
        stringHtml = exporter.Export();
    }

#Inheritance

See Also