Skip to main content
Add subtle emphasis with italic styling. Classic slanted text for emphasis, thoughts, or citations.

OOXML Structure

<w:r>
  <w:rPr>
    <w:i/>
  </w:rPr>
  <w:t>Italic text</w:t>
</w:r>

Use case

  • Emphasis - Softer than bold
  • Foreign words - Lorem ipsum, c’est la vie
  • Thoughts - Internal dialogue or asides
  • Citations - Book titles, publications
  • Technical terms - First usage of terminology

Commands

setItalic

Apply italic formatting to the current selection.
editor.commands.setItalic()
import { SuperDoc } from 'superdoc';
import 'superdoc/style.css';

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

unsetItalic

Remove italic formatting from the current selection.
editor.commands.unsetItalic()
import { SuperDoc } from 'superdoc';
import 'superdoc/style.css';

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

toggleItalic

Toggle italic formatting on the current selection.
editor.commands.toggleItalic()
import { SuperDoc } from 'superdoc';
import 'superdoc/style.css';

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

Keyboard shortcuts

CommandShortcutDescription
toggleItalic()⌘/Ctrl-iToggle italic formatting
toggleItalic()⌘/Ctrl-IToggle italic formatting (uppercase)

Source code