Docs
Mention

Mention

Enable autocompletion for user mentions.

@ Mention

Mention and reference other users or entities within your text using @-mentions.
Try mentioning
R2-D2
or
Mace Windu
.

Features

  • Provides smart autocompletion for mentioning users or applying tags.
  • Invoke combobox with @ or # and select suggestion.

Installation

npm install @udecode/plate-mention @udecode/plate-combobox

Usage

import { createComboboxPlugin } from '@udecode/plate-combobox';
import { createMentionPlugin } from '@udecode/plate-mention';
 
const plugins = [
  // ...otherPlugins,
  createComboboxPlugin(),
  createMentionPlugin(),
];

API

createMentionPlugin

Attributes

Collapse all

    Options.

    A function to create the mention node.

    A unique identifier for the mention plugin.

    Whether to insert a space after the mention.

    The character that triggers the mention (for example, '@' in the case of a user mention).

    An object containing the key-value pair for creating an input.

    A query function to enable the behavior.

getMentionOnSelectItem

Combobox.onSelectItem prop value.

findMentionInput

isNodeMentionInput

isSelectionInMentionInput

mentionOnKeyDownHandler

moveSelectionByOffset

removeMentionInput