diff --git a/apps/web/core/hooks/editor/use-editor-mention.tsx b/apps/web/core/hooks/editor/use-editor-mention.tsx index 622fc04389..80e7b15991 100644 --- a/apps/web/core/hooks/editor/use-editor-mention.tsx +++ b/apps/web/core/hooks/editor/use-editor-mention.tsx @@ -46,7 +46,6 @@ export const useEditorMention = (args: TArgs) => { name={user.member__display_name} /> ), - id: user.member__id, entity_identifier: user.member__id, entity_name: "user_mention", title: user.member__display_name, diff --git a/packages/editor/src/core/constants/extension.ts b/packages/editor/src/core/constants/extension.ts index 369be0648f..11733a6fea 100644 --- a/packages/editor/src/core/constants/extension.ts +++ b/packages/editor/src/core/constants/extension.ts @@ -69,3 +69,5 @@ export const BLOCK_NODE_TYPES = [ CORE_EXTENSIONS.CALLOUT, CORE_EXTENSIONS.WORK_ITEM_EMBED, ]; + +export const INLINE_NODE_TYPES = [CORE_EXTENSIONS.MENTION]; diff --git a/packages/editor/src/core/extensions/callout/block.tsx b/packages/editor/src/core/extensions/callout/block.tsx index 906bbb6f4e..f6e8454e29 100644 --- a/packages/editor/src/core/extensions/callout/block.tsx +++ b/packages/editor/src/core/extensions/callout/block.tsx @@ -1,6 +1,6 @@ import type { NodeViewProps } from "@tiptap/react"; import { NodeViewContent, NodeViewWrapper } from "@tiptap/react"; -import React, { useState } from "react"; +import { useState } from "react"; // constants import { COLORS_LIST } from "@/constants/common"; // local components @@ -33,6 +33,7 @@ export function CustomCalloutBlock(props: CustomCalloutNodeViewProps) { style={{ backgroundColor: activeBackgroundColor, }} + key={`callout-block-${node.attrs.id}`} > ) => { @@ -33,7 +37,7 @@ export function CodeBlockComponent({ node }: Props) { }; return ( - +