# MentionFeed

interface

The mention feed descriptor. Used in [`config.mention`](module_mention_mentionconfig-MentionConfig.md).

See [`MentionConfig`](module_mention_mentionconfig-MentionConfig.md) to learn more.

```typescript
// Static configuration.
const mentionFeedPeople = {
	marker: '@',
	feed: [ '@Alice', '@Bob', ... ],
	minimumCharacters: 2
};

// Simple synchronous callback.
const mentionFeedTags = {
	marker: '#',
	feed: ( searchString: string ) => {
		return tags
			// Filter the tags list.
			.filter( tag => {
				return tag.toLowerCase().includes( queryText.toLowerCase() );
			} )
	}
};

const tags = [ 'wysiwyg', 'rte', 'rich-text-edior', 'collaboration', 'real-time', ... ];

// Asynchronous callback.
const mentionFeedPlaceholders = {
	marker: '$',
	feed: ( searchString: string ) => {
		return getMatchingPlaceholders( searchString );
	}
};

function getMatchingPlaceholders( searchString: string ) {
	return new Promise<Array<MentionFeedItem>>( resolve => {
		doSomeXHRQuery( result => {
			// console.log( result );
			// -> [ '$name', '$surname', '$postal', ... ]

			resolve( result );
		} );
	} );
}
```

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

<a id="properties">

## Properties

<a id="member-dropdownLimit">

### `dropdownLimit?: number`

Specify how many available elements per feeds will the users be able to see in the dropdown list. If it not set, limit is inherited from [MentionConfig](module_mention_mentionconfig-MentionConfig.md#member-dropdownLimit).

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

<a id="member-feed">

### `feed: Array<MentionFeedItem> | MentionFeedbackCallback`

Autocomplete items. Provide an array for a static configuration (the mention feature will show matching items automatically) or a function which returns an array of matching items (directly, or via a promise). If a function is passed, it is executed in the context of the editor instance.

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

<a id="member-itemRenderer">

### `itemRenderer?: MentionItemRenderer`

A function that renders a [`MentionFeedItem`](module_mention_mentionconfig-MentionFeedItem.md) to the autocomplete panel.

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

<a id="member-marker">

### `marker: string`

The character which triggers autocompletion for mention. It must be a single character.

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

<a id="member-minimumCharacters">

### `minimumCharacters?: number`

Specifies after how many characters the autocomplete panel should be shown.

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

Defaults to `0`

---

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