Back to Devexpress

HtmlDocumentExporterOptions.HtmlNumberingListExportFormat Property

officefileapi-devexpress-dot-xtrarichedit-dot-export-dot-htmldocumentexporteroptions-b109c8e4.md

latest6.6 KB
Original Source

HtmlDocumentExporterOptions.HtmlNumberingListExportFormat Property

Gets or sets how the lists are represented in the resulting document.

Namespace : DevExpress.XtraRichEdit.Export

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
public HtmlNumberingListExportFormat HtmlNumberingListExportFormat { get; set; }
vb
Public Property HtmlNumberingListExportFormat As HtmlNumberingListExportFormat

Property Value

TypeDescription
HtmlNumberingListExportFormat

A HtmlNumberingListExportFormat enumeration value specifying how the lists are exported.

|

Available values:

NameDescription
PlainTextFormat

Uses characters to mark lists.

| | HtmlFormat |

Uses HTML tags to mark lists.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to HtmlNumberingListExportFormat
RichEditDocumentExportOptions

.Html .HtmlNumberingListExportFormat

|

Remarks

Handle the RichEditControl.BeforeExport and RichEditDocumentServer.BeforeExport event and specify the list representation - that is, whether HTML tags like <li> are used, - via the BeforeExportEventArgs.Options property of the event arguments.

The following code snippet illustrates this:

View Example

csharp
private void richEditControl_BeforeExport(object sender, DevExpress.XtraRichEdit.BeforeExportEventArgs e) {
    DevExpress.XtraRichEdit.Export.HtmlDocumentExporterOptions options = e.Options as DevExpress.XtraRichEdit.Export.HtmlDocumentExporterOptions;
    if (options != null) 
{
        options.CssPropertiesExportType = DevExpress.XtraRichEdit.Export.Html.CssPropertiesExportType.Link;
        options.HtmlNumberingListExportFormat = DevExpress.XtraRichEdit.Export.Html.HtmlNumberingListExportFormat.HtmlFormat;
        options.TargetUri = Path.GetFileNameWithoutExtension(this.fileName);
    }
}
vb
Private Sub richEditControl_BeforeExport(ByVal sender As Object, ByVal e As DevExpress.XtraRichEdit.BeforeExportEventArgs)
    Dim options As DevExpress.XtraRichEdit.Export.HtmlDocumentExporterOptions = TryCast(e.Options, DevExpress.XtraRichEdit.Export.HtmlDocumentExporterOptions)
    If options IsNot Nothing Then
        options.CssPropertiesExportType = DevExpress.XtraRichEdit.Export.Html.CssPropertiesExportType.Link
        options.HtmlNumberingListExportFormat = DevExpress.XtraRichEdit.Export.Html.HtmlNumberingListExportFormat.HtmlFormat
        options.TargetUri = Path.GetFileNameWithoutExtension(Me.fileName)
    End If
End Sub

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

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.

winforms-richedit-save-text-from-a-range-in-different-formats/CS/GetTextMethodsExample/Form1.cs#L251

csharp
options.CssPropertiesExportType = DevExpress.XtraRichEdit.Export.Html.CssPropertiesExportType.Link;
options.HtmlNumberingListExportFormat = DevExpress.XtraRichEdit.Export.Html.HtmlNumberingListExportFormat.HtmlFormat;
options.TargetUri = Path.GetFileNameWithoutExtension(this.fileName);

word-document-api-examples/CS/CodeExamples/ExportActions.cs#L149

csharp
options.CssPropertiesExportType = CssPropertiesExportType.Link;
options.HtmlNumberingListExportFormat = HtmlNumberingListExportFormat.HtmlFormat;
options.TargetUri = "Document_HTML.html";

winforms-richedit-save-text-from-a-range-in-different-formats/VB/GetTextMethodsExample/Form1.vb#L191

vb
options.CssPropertiesExportType = DevExpress.XtraRichEdit.Export.Html.CssPropertiesExportType.Link
options.HtmlNumberingListExportFormat = DevExpress.XtraRichEdit.Export.Html.HtmlNumberingListExportFormat.HtmlFormat
options.TargetUri = Path.GetFileNameWithoutExtension(Me.fileName)

word-document-api-examples/VB/CodeExamples/ExportActions.vb#L133

vb
options.CssPropertiesExportType = Html.CssPropertiesExportType.Link
options.HtmlNumberingListExportFormat = Html.HtmlNumberingListExportFormat.HtmlFormat
options.TargetUri = "Document_HTML.html"

See Also

HtmlDocumentExporterOptions Class

HtmlDocumentExporterOptions Members

DevExpress.XtraRichEdit.Export Namespace