Important: Linked Styles work with Word documents. This demo simulates the visual effect.
Real-World Usage
When a Word document is loaded:OOXML Structure
Use case
- Document Templates - Maintain corporate style guides
- Consistency - Uniform formatting across large documents
- Quick Formatting - One-click style application
- Word Compatibility - Preserves Word’s style system
- Style Updates - Change all instances by updating the style definition
Commands
setLinkedStyle
Apply a linked style to the selected paragraphs.
Example:
LinkedStyle
required
The style object to apply
toggleLinkedStyle
Toggle a linked style on the current selection. Removes the style if already applied, applies it if not.
Example:
LinkedStyle
required
The linked style to apply (with id property)
string
Node type to restrict toggle to (e.g., ‘paragraph’)
setStyleById
Apply a linked style by its ID.
Example:
string
required
The style ID to apply (e.g., ‘Heading1’)
Helpers
getStyles
Get all available linked styles from the document.
Example:
Array
required
Array of linked style objects
getStyleById
Get a specific style by ID.
Example:
string
required
The style ID to find
Object
required
The style object or undefined

