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

Commands

setTextIndentation

Set text indentation in points. Example:
// Set to 72 points (1 inch)
editor.commands.setTextIndentation(72)

// Set to 36 points (0.5 inch)
editor.commands.setTextIndentation(36)
import { SuperDoc } from 'superdoc';
import 'superdoc/style.css';

const superdoc = new SuperDoc({
  selector: '#editor',
  document: yourFile,
  onReady: (superdoc) => {
    const editor = superdoc.activeEditor;
    // Set to 72 points (1 inch)
    editor.commands.setTextIndentation(72)

    // Set to 36 points (0.5 inch)
    editor.commands.setTextIndentation(36)
  },
});
Parameters:
points
number
required
Indentation value in points

unsetTextIndentation

Remove text indentation from selected paragraphs. Example:
editor.commands.unsetTextIndentation()
import { SuperDoc } from 'superdoc';
import 'superdoc/style.css';

const superdoc = new SuperDoc({
  selector: '#editor',
  document: yourFile,
  onReady: (superdoc) => {
    const editor = superdoc.activeEditor;
    editor.commands.unsetTextIndentation()
  },
});

increaseTextIndent

Increase text indentation by 36 points (0.5 inch). Example:
editor.commands.increaseTextIndent()
import { SuperDoc } from 'superdoc';
import 'superdoc/style.css';

const superdoc = new SuperDoc({
  selector: '#editor',
  document: yourFile,
  onReady: (superdoc) => {
    const editor = superdoc.activeEditor;
    editor.commands.increaseTextIndent()
  },
});

decreaseTextIndent

Decrease text indentation by 36 points. Removes indentation completely if it reaches 0 or below. Example:
editor.commands.decreaseTextIndent()
import { SuperDoc } from 'superdoc';
import 'superdoc/style.css';

const superdoc = new SuperDoc({
  selector: '#editor',
  document: yourFile,
  onReady: (superdoc) => {
    const editor = superdoc.activeEditor;
    editor.commands.decreaseTextIndent()
  },
});

Source code