Skip to main content

MentionExtension

Summary

The mention extension wraps mentions as a prosemirror mark. It allows for fluid social experiences to be built. The implementation was inspired by the way twitter and similar social sites allows mentions to be edited after they've been created.

Features

Mentions have the following features

  • An activation character or regex pattern which you define.
  • A min number of characters before mentions are suggested
  • Ability to exclude matching character.
  • Ability to wrap content in a decoration which excludes mentions from being suggested.
  • Decorations for in-progress mentions

Usage

Installation

This extension is installed for you when you install the main remirror package.

You can use the imports in the following way:

import { MentionExtension } from 'remirror/extensions';

The extension is provided by the @remirror/extension-mention package.

Examples

See storybook for examples.

API