> ## Documentation Index
> Fetch the complete documentation index at: https://superdoc-caio-pizzol-docs-ai-core-preset.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Extensions API

Extensions are the building blocks of SuperDoc. Every feature—from bold text to track changes—comes from an extension.

## Understanding extensions

Extensions provide:

* **Commands** - Actions like `toggleBold()` or `insertTable()`
* **Schema** - Define what can exist in documents
* **Behavior** - Keyboard shortcuts, input rules, events

## Using extensions

You don't typically configure extensions directly. SuperDoc handles it:

<CodeGroup>
  ```javascript Usage theme={null}
  // These commands come from extensions
  editor.commands.toggleBold();        // Bold extension
  editor.commands.insertTable();       // Table extension
  editor.commands.acceptAllTrackedChanges();  // TrackChanges extension
  ```

  ```javascript Full Example theme={null}
  import { SuperDoc } from 'superdoc';
  import 'superdoc/style.css';

  const superdoc = new SuperDoc({
    selector: '#editor',
    document: yourFile,
    onReady: (superdoc) => {
      const editor = superdoc.activeEditor;
      // These commands come from extensions
      editor.commands.toggleBold();        // Bold extension
      editor.commands.insertTable();       // Table extension
      editor.commands.acceptAllTrackedChanges();  // TrackChanges extension
    },
  });
  ```
</CodeGroup>

## Extension categories

### Core editing

Basic document capabilities:

* **[Bold](/extensions/bold)**, **[Italic](/extensions/italic)**, **[Underline](/extensions/underline)**, **[Strike](/extensions/strike)**- Text formatting
* **[Strike](/extensions/strike)**, **[Heading](/extensions/heading)** - Document structure
* **[Lists](/extensions/bullet-list)**, **[Tables](/extensions/table)** - Bullet points and tables

### Advanced features

Complex functionality:

* **[Track Changes](/editor/built-in-ui/track-changes)** - Revision tracking
* **[Comments](/extensions/comments)** - Discussions
* **[Field Annotation](/extensions/field-annotation)** - Form fields
* **[Document Section](/extensions/document-section)** - Locked sections
* **[Table](/extensions/table)** - Complex tables
* **[Search](/extensions/search)** - Find and replace

### Custom extensions

**[Build your own →](/advanced/custom-extensions)**

## How extensions work

1. **Registration** - Extensions load with the editor
2. **Schema definition** - Define nodes/marks
3. **Command registration** - Add to `editor.commands`
4. **Event handling** - React to changes
