Skip to main content
Apply Word document styles to maintain consistent formatting across your document. Linked styles preserve the original Word styling system, including style inheritance and formatting rules.
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:
Parameters:
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:
Parameters:
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:
Parameters:
string
required
The style ID to apply (e.g., ‘Heading1’)

Helpers

getStyles

Get all available linked styles from the document. Example:
Returns:
Array
required
Array of linked style objects

getStyleById

Get a specific style by ID. Example:
Parameters:
string
required
The style ID to find
Returns:
Object
required
The style object or undefined

Types

LinkedStyle

Style definition from a Word document.

Source code