HtmlExporter Class
Represents an object used to export the document content in HTML format.
Namespace: DevExpress.XtraRichEdit.Export.Html
Assembly: DevExpress.RichEdit.v19.1.Core.dll
Declaration
Remarks
The HtmlExporterBase.Export method of the HtmlExporter object is used to accomplish the export task, as illustrated in the following code snippet:
Note
A complete sample project is available at https://github.com/DevExpress-Examples/export-to-html-how-to-export-only-body-tag-content-and-specify-the-location-of-css-styles-e1726
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();
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the HtmlExporter class.
Note
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.