Live ListFormat API
Inspect list structure
Move the caret through the sample lists. The inspector explains how each paragraph is numbered and lets you change the underlying list definition.
Current paragraphWaiting for the editor
Reading list format
List type-
Level-
Number format-
Starts at-
Prefix / suffix-
Indent-
Format the selected paragraphs
List type
Hierarchy levelLevel -
Number definition
Numbered and outline lists
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Word-compatible list formatting
Lists are paragraph formatting, not manually typed characters. A list definition controls the marker, hierarchy, indentation, restart behavior, and numbering sequence while the paragraph content remains editable text.
Current list
Selection.listFormat
List kind
ListFormat.getType / setType
Hierarchy
ListFormat.getLevel / setLevel
Number definition
setNumberFormat / setFirstNumber / setRestartNumbering
How it works
Selection.listFormat exposes the list definition shared by the selected paragraphs. ListType.None removes list formatting, ListType.Bulleted uses a symbol marker, and ListType.Numbered creates a sequence. ListType.Structured includes higher-level numbers to produce outline markers such as 1.2.1.
ListFormat.getLevel identifies the hierarchy level. Changing it with setLevel alters both the semantic nesting and the visual indentation, rather than inserting tabs or spaces into the paragraph text.
NumberFormat selects Arabic numbers, letters, capital letters, Roman numbers, or lowercase Roman numbers. setTextBeforeNumber and setTextAfterNumber add literal marker text, while setFirstNumber controls the sequence's initial value.
setRestartNumbering marks a paragraph as the beginning of a new sequence. All changes remain part of the Word-compatible document model and are preserved when the document is saved.
NuGet packages
TXTextControl.TextControl.Core.SDK
34.0.4
Provides the core document model and server-side document processing APIs.
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.4
Provides the browser-based TX Text Control document editor and JavaScript API.
dotnet add package TXTextControl.Web --version 34.4.0
TXTextControl.Web.DocumentEditor.Backend
34.4.0
Hosts the WebSocket-based backend used by the browser document editor.
dotnet add package TXTextControl.Web.DocumentEditor.Backend --version 34.4.0