Sign up (with export icon)

MentionFeedItem

Api-typedef icontypedef

The mention feed item. It may be defined as a string or a plain object.

When defining a feed item as a plain object, the id property is obligatory. Additional properties can be used when customizing the mention feature bahavior (see "Customizing the autocomplete list" and "Customizing the output" sections).

ClassicEditor
	.create( {
		plugins: [ Mention, ... ],
		mention: {
			feeds: [
				// Feed items as objects.
				{
					marker: '@',
					feed: [
						{
							id: '@Barney',
							fullName: 'Barney Bloom'
						},
						{
							id: '@Lily',
							fullName: 'Lily Smith'
						},
						{
							id: '@Marshall',
							fullName: 'Marshall McDonald'
						},
						{
							id: '@Robin',
							fullName: 'Robin Hood'
						},
						{
							id: '@Ted',
							fullName: 'Ted Cruze'
						},
						// ...
					]
				},

				// Feed items as plain strings.
				{
					marker: '#',
					feed: [ 'wysiwyg', 'rte', 'rich-text-edior', 'collaboration', 'real-time', ... ]
				},
			]
		}
	} )
	.then( ... )
	.catch( ... );
Copy code

Value

string | MentionFeedObjectItem