Click or drag to resize

ExportListLabels Enumeration

Specifies how list labels are exported to HTML, MHTML and EPUB.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public enum ExportListLabels
Members
  Member nameValueDescription
Auto0 Outputs list labels in auto mode. Uses HTML native elements when possible.
AsInlineText1 Outputs all list labels as inline text.
ByHtmlTags2 Outputs all list labels as HTML native elements.
Remarks
Examples
Shows how to export an indented list to .html as plain text.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Use the builder to insert a list
Aspose.Words.Lists.List list = doc.Lists.Add(ListTemplate.NumberDefault);
builder.ListFormat.List = list;

builder.Writeln("List item 1.");
builder.ListFormat.ListIndent();
builder.Writeln("List item 2.");
builder.ListFormat.ListIndent();
builder.Write("List item 3.");

// When we save this to .html, normally our list will be represented by <li> tags
// We can set this flag to have lists as plain text instead
HtmlSaveOptions options = new HtmlSaveOptions
{
    ExportListLabels = ExportListLabels.AsInlineText,
    PrettyFormat = true
};

doc.Save(ArtifactsDir + "HtmlSaveOptions.List.html", options);
See Also