# MentionConfig

interface

The configuration of the mention feature.

Read more about [configuring the mention feature](../features/mentions.md#configuration).

```typescript
ClassicEditor
	.create( {
		mention: ... // Mention feature options.
	} )
	.then( ... )
	.catch( ... );
```

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

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-mention/src/mentionconfig.ts#L26)

<a id="properties">

## Properties

<a id="member-commitKeys">

### `commitKeys?: Array<number>`

The configuration of the custom commit keys supported by the editor.

```typescript
ClassicEditor
	.create( {
		plugins: [ Mention, ... ],
		mention: {
			// [ Enter, Space ]
			commitKeys: [ 13, 32 ]
			feeds: [
				{ ... }
				...
			]
		}
	} )
	.then( ... )
	.catch( ... );
```

Custom commit keys configuration allows you to customize how users will confirm the selection of mentions from the dropdown list. You can add as many mention commit keys as you need. For instance, in the snippet above new mentions will be committed by pressing either `Enter` or `Space` (13 and 32 key codes respectively).

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-mention/src/mentionconfig.ts#L80)

Defaults to `[ 13, 9 ] // [ Enter, Tab ]`

<a id="member-dropdownLimit">

### `dropdownLimit?: number`

The configuration of the custom number of visible mentions.

Customizing the number of visible mentions allows you to specify how many available elements will the users be able to see in the dropdown list. You can specify any number you see fit. For example, in the snippets below you will find the dropdownLimit set to `20` and `Infinity` (the latter will result in showing all available mentions).

```typescript
ClassicEditor
	.create( {
		plugins: [ Mention, ... ],
		mention: {
			dropdownLimit: 20,
			feeds: [
				{ ... }
				...
			]
		}
	} )
	.then( ... )
	.catch( ... );

ClassicEditor
	.create( {
		plugins: [ Mention, ... ],
		mention: {
			dropdownLimit: Infinity,
			feeds: [
				{ ... }
				...
			]
		}
	} )
	.then( ... )
	.catch( ... );
```

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-mention/src/mentionconfig.ts#L121)

Defaults to `10`

<a id="member-feeds">

### `feeds: Array<MentionFeed>`

The list of mention feeds supported by the editor.

```typescript
ClassicEditor
	.create( {
		plugins: [ Mention, ... ],
		mention: {
			feeds: [
				{
					marker: '@',
					feed: [ '@Barney', '@Lily', '@Marshall', '@Robin', '@Ted' ]
				},
				...
			]
		}
	} )
	.then( ... )
	.catch( ... );
```

You can provide many mention feeds but they must use different `marker`s. For example, you can use `'@'` to autocomplete people and `'#'` to autocomplete tags.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-mention/src/mentionconfig.ts#L52)

---

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