Key Features
Custom Node View
The list item uses a custom node view that provides:- Visual numbering/bullets - Rendered separately from content
- Smart indentation - Calculates proper spacing based on Word styles
- Font inheritance - Respects document and paragraph styles
- Marker alignment - Handles left, right, and centered numbering
Word Compatibility Attributes
The list item maintains numerous Word-specific attributes:numId
- Links to Word numbering definitionlevel
- Tracks nesting depth (0-8)lvlText
- Format string for numberinglistNumberingType
- decimal, upperRoman, lowerAlpha, etc.indent
- Precise indentation valuesspacing
- Line and paragraph spacing
OOXML Structure
Keyboard Shortcuts
Action | Shortcut | Description |
---|---|---|
New Item | Enter | Creates a new list item at the same level |
Line Break | Shift+Enter | Adds a line break within the current item |
Indent | Tab | Increases nesting level |
Outdent | Shift+Tab | Decreases nesting level |
Exit List | Enter twice | Creates a paragraph after the list |
Numbering Formats
Standard Formats
- Decimal - 1, 2, 3, 4…
- Lower Alpha - a, b, c, d…
- Upper Alpha - A, B, C, D…
- Lower Roman - i, ii, iii, iv…
- Upper Roman - I, II, III, IV…
Custom Formats
Word supports complex numbering like:- Legal - 1.1, 1.2, 1.2.1, 1.2.2…
- Outline - I.A.1.a.i…
- Custom - Chapter 1, Section A, Article i…
Use Case
- Document Structure - Organize content hierarchically
- Instructions - Step-by-step procedures
- Outlines - Multi-level document planning
- Legal Documents - Complex numbered sections
- Word Import/Export - Perfect numbering preservation
Options
Configure the extension behavior:HTML attributes for list item elements
Name of bullet list node type
Name of ordered list node type
Attributes
Node attributes that can be set and retrieved:Virtual attribute for marker display
Level text template for numbering
Numbering format type
List level hierarchy
Level justification (left, right, center)
Indentation and spacing info
Run properties for list item
Numbering definition ID
Numbering properties type
Current nesting level
Additional attributes
Spacing configuration
Indentation settings
Marker styling
Linked style ID
Custom numbering format
Font family from import
Font size from import
Commands
setLinkedStyle
Apply a linked style to the selected paragraphs
Works with custom selection preservation
The style object to apply
toggleLinkedStyle
Toggle a linked style on the current selection
Removes style if already applied, applies it if not
The linked style to apply (with id property)
Node type to restrict toggle to (e.g., ‘paragraph’)
setStyleById
Apply a linked style by its ID
Looks up the style from loaded Word styles
The style ID to apply (e.g., ‘Heading1’)
restorePreservedSelection
Restore the preserved selection
Used internally to maintain selection when interacting with toolbar
Function
Command function
Helpers
getStyles
Get all available linked styles
Example:
Array of linked style objects
getStyleById
Get a specific style by ID
Example:
The style ID to find
The style object or undefined
Keyboard Shortcuts
Command | Shortcut | Description |
---|---|---|
splitListItem() | Enter | Split list item at cursor |
createParagraphNear() | Shift-Enter | Create paragraph in list |
increaseListIndent() | Tab | Increase list indentation |
decreaseListIndent() | Shift-Tab | Decrease list indentation |