| 1 | "use client"; |
| 2 | |
| 3 | import { MentionInputPlugin, MentionPlugin } from "@platejs/mention/react"; |
| 4 | |
| 5 | import { |
| 6 | MentionElement, |
| 7 | MentionInputElement, |
| 8 | } from "@/components/plate/ui/mention-node"; |
| 9 | |
| 10 | export const MentionKit = [ |
| 11 | MentionPlugin.configure({ |
| 12 | options: { triggerPreviousCharPattern: /^$|^[\s"']$/ }, |
| 13 | }).withComponent(MentionElement), |
| 14 | MentionInputPlugin.withComponent(MentionInputElement), |
| 15 | ]; |
| 16 |