> ## Documentation Index
> Fetch the complete documentation index at: https://superdoc-nick-sd-2070-add-content-controls-namespace-to-doc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SuperDoc API

The SuperDoc instance is your main interface for controlling the DOCX editor. It handles document loading, editor management, and all interactions.

## Creating an instance

```javascript theme={null}
import { SuperDoc } from 'superdoc';

const superdoc = new SuperDoc({
  selector: '#editor',
  document: 'contract.docx'
});
```

## Instance lifecycle

```javascript theme={null}
// 1. Creation
const superdoc = new SuperDoc(config);

// 2. Ready event
superdoc.on('ready', () => {
  // Now safe to use methods
});

// 3. Runtime operations
superdoc.setDocumentMode('suggesting');
superdoc.export();

// 4. Cleanup
superdoc.destroy();
```

## API structure

* **[Configuration](/core/superdoc/configuration)** - Settings passed at creation
* **[Methods](/core/superdoc/methods)** - Control the editor, access properties and types
* **[Events](/core/superdoc/events)** - Lifecycle and change notifications
