fix: mentions not working in any editor (#4915)

This commit is contained in:
Aaryan Khandelwal 2024-06-24 13:49:11 +05:30 committed by GitHub
parent 1c8e709870
commit dcbd974ac5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -52,11 +52,9 @@ export const CustomMention = ({
},
};
},
addNodeView() {
return ReactNodeViewRenderer(MentionNodeView);
},
parseHTML() {
return [
{
@ -67,12 +65,14 @@ export const CustomMention = ({
renderHTML({ HTMLAttributes }) {
return ["mention-component", mergeAttributes(HTMLAttributes)];
},
}).configure({
HTMLAttributes: {
class: "mention",
},
readonly: readonly,
mentionHighlights: mentionHighlights,
mentionHighlights,
suggestion: {
// @ts-expect-error - Tiptap types are incorrect
render: () => {
if (!mentionSuggestions) return;
let component: ReactRenderer | null = null;