Skip to main content
Add professional first-line indentation to paragraphs. Essential for academic papers, books, and formal documents with perfect Word compatibility.

OOXML Structure

<w:p>
  <w:pPr>
    <w:ind w:firstLine="720"/>
    <!-- 720 = 0.5 inches in twips -->
  </w:pPr>
  <w:r>
    <w:t>Indented paragraph text</w:t>
  </w:r>
</w:p>

Use Case

  • Academic Papers - MLA/APA format requires 0.5” first-line indents
  • Books & Novels - Standard typography for fiction and non-fiction
  • Business Letters - Professional correspondence formatting
  • Block Quotes - Distinguish quoted material with deeper indents
  • Outlines - Create visual hierarchy with progressive indentation

Options

Configure the extension behavior:
types
Array<string>
default:"['heading','paragraph']"
Node types to apply indentation to
defaults
Object
Default indentation settings
defaults.unit
string
default:"in"
Default unit for indentation (in, cm, px, etc.)
defaults.increment
number
default:"0.125"
Default increment/decrement value

Attributes

Node attributes that can be set and retrieved:
textIndent
string
Text indentation value with unit (e.g., ‘0.5in’)

Commands

setTextIndent

Set text indentation
Accepts any valid CSS unit (in, cm, px, em, etc.)
Example:
// Set to 0.5 inches
setTextIndent('0.5in')

// Set to 2 centimeters
setTextIndent('2cm')
Parameters:
indent
string
required
Indentation value with unit (e.g., ‘0.5in’, ‘2cm’)
Returns: Function Command function

unsetTextIndent

Remove text indentation
Removes all indentation from the selected nodes
Example:
editor.commands.unsetTextIndent()
Returns: Function Command function

increaseTextIndent

Increase text indentation
Creates initial indent if none exists
Example:
editor.commands.increaseTextIndent()
Returns: Function Command function

decreaseTextIndent

Decrease text indentation
Removes indentation completely if it reaches 0 or below
Example:
editor.commands.decreaseTextIndent()
Returns: Function Command function

Source Code