MentionFeed
The mention feed descriptor. Used in config.mention.
See MentionConfig to learn more.
// 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: 'Properties
-
dropdownLimit : number | undefinedmodule:mention/mentionconfig~MentionFeed#dropdownLimitSpecify 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.
-
feed : Array<MentionFeedItem> | MentionFeedbackCallbackmodule:mention/mentionconfig~MentionFeed#feedAutocomplete 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.
-
itemRenderer : MentionItemRenderer | undefinedmodule:mention/mentionconfig~MentionFeed#itemRendererA function that renders a
MentionFeedItemto the autocomplete panel. -
marker : stringmodule:mention/mentionconfig~MentionFeed#markerThe character which triggers autocompletion for mention. It must be a single character.
-
minimumCharacters : number | undefinedmodule:mention/mentionconfig~MentionFeed#minimumCharactersSpecifies after how many characters the autocomplete panel should be shown.
Defaults to
0