# Integrating ProseMirror Mentions Plugin in Editor

## Environment

<table>
	<tr>
		<td>Product</td>
		<td>Progress® Kendo UI® for Angular Editor</td>
	</tr>
</table>

## Description

How can I use `@mentions` and `#hashtags` inside [Kendo UI for Editor component](https://www.telerik.com/kendo-angular-ui/components/editor)?

This Knowledge Base article also answers the following questions:

* How to implement a custom plugin that allows mentions and hashtags in the Kendo UI for Angular Editor?
* How to customize the appearance of the mentions dropdown list?
* How to handle mentions and hashtags in the Editor content?

## Solution

You can use the [proseMirror-mentions](https://github.com/joelewis/prosemirror-mentions) plugin to provide a `@mentions` and `#hashtags` functionality for the Kendo UI for Angular Editor component. To implement the feature, you need to customize and integrate the built-in [ProseMirror Schema](https://www.telerik.com/kendo-angular-ui/components/editor/schema) and [ProseMirror Plugins](https://www.telerik.com/kendo-angular-ui/components/editor/plugins).

When you integrate the solution in your project, you would need to create a file named `prosemirror-mentions.d.ts` in the `src` folder of your project. The file should contain the following code:

```typescript
declare module 'prosemirror-mentions';
```

This file is required to avoid TypeScript errors when you import the `prosemirror-mentions` plugin in your project.

Additionally, for proper dynamic positioning of the mentions list, you need to set the [`iframe`](https://www.telerik.com/kendo-angular-ui/components/editor/api/editorcomponent#iframe) property of the Editor to `false`. This ensures that the mentions dropdown can be positioned correctly relative to the editor content.

```html
<kendo-editor [iframe]="false">
</kendo-editor>
```

The following example demonstrates how to integrate the `proseMirror-mention` plugin in Editor.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/knowledge-base/editor-mention/source.txt)

## Suggested Links

* [Editor Schema](https://www.telerik.com/kendo-angular-ui/components/editor/schema)
* [Editor Plugins](https://www.telerik.com/kendo-angular-ui/components/editor/plugins)
* [ProseMirror Documentation](https://prosemirror.net/docs/ref/)
