# DocumentOutlineTableOfContentsConfig

interface

The configuration of the [table of contents feature](module_document-outline_tableofcontents-TableOfContents.md).

```typescript
ClassicEditor
	.create( {
		plugins: [ TableOfContents, /* ... */ ],
		tableOfContents: {
			headings: [ 'heading1', 'heading2' ]
		}
	} )
	.then( /* ... */ )
	.catch( /* ... */ );
```

See [all editor options](module_core_editor_editorconfig-EditorConfig.md).

<a id="properties">

## Properties

<a id="member-headings">

### `headings?: Array<string>`

An ordered array of model heading element names to include in the table of contents.

When set, only headings matching these names are rendered in the ToC widget, independently of [`documentOutline.headings`](module_document-outline_documentoutline-DocumentOutlineConfig.md#member-headings).

The index of the heading in the array reflects the heading nesting level in the table of contents.

```typescript
ClassicEditor
	.create( {
		plugins: [ TableOfContents, /* ... */ ],
		tableOfContents: {
			headings: [ 'heading1', 'heading2' ]
		}
	} )
	.then( /* ... */ )
	.catch( /* ... */ );
```

When not set, the ToC inherits headings from `DocumentOutlineUtils` (the existing default behavior).

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
