> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superdoc.dev/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](https://docs.superdoc.dev/editor/superdoc/configuration.md)** - Settings passed at creation
* **[Methods](https://docs.superdoc.dev/editor/superdoc/methods.md)** - Control the editor, access properties and types
* **[Events](https://docs.superdoc.dev/editor/superdoc/events.md)** - Lifecycle and change notifications


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.