mirror of
https://github.com/docmost/docmost.git
synced 2026-08-24 02:52:12 +10:00
fix: supported comment nodes
This commit is contained in:
@@ -3,14 +3,7 @@ import { Placeholder } from "@tiptap/extension-placeholder";
|
|||||||
import { StarterKit } from "@tiptap/starter-kit";
|
import { StarterKit } from "@tiptap/starter-kit";
|
||||||
import { TextStyle } from "@tiptap/extension-text-style";
|
import { TextStyle } from "@tiptap/extension-text-style";
|
||||||
import { Color } from "@tiptap/extension-color";
|
import { Color } from "@tiptap/extension-color";
|
||||||
import {
|
import { Mention, LinkExtension } from "@docmost/editor-ext";
|
||||||
Mention,
|
|
||||||
LinkExtension,
|
|
||||||
TiptapImage,
|
|
||||||
SharedStorage,
|
|
||||||
Attachment,
|
|
||||||
} from "@docmost/editor-ext";
|
|
||||||
import ImageView from "@/features/editor/components/image/image-view";
|
|
||||||
import classes from "./comment.module.css";
|
import classes from "./comment.module.css";
|
||||||
import { useFocusWithin } from "@mantine/hooks";
|
import { useFocusWithin } from "@mantine/hooks";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
@@ -21,7 +14,7 @@ import mentionRenderItems from "@/features/editor/components/mention/mention-sug
|
|||||||
import MentionView from "@/features/editor/components/mention/mention-view";
|
import MentionView from "@/features/editor/components/mention/mention-view";
|
||||||
import { platformModifierKey } from "@/lib";
|
import { platformModifierKey } from "@/lib";
|
||||||
import { TableKit } from "@tiptap/extension-table";
|
import { TableKit } from "@tiptap/extension-table";
|
||||||
import AttachmentView from "@/features/editor/components/attachment/attachment-view.tsx";
|
import { TaskList, TaskItem } from "@tiptap/extension-list";
|
||||||
|
|
||||||
interface CommentEditorProps {
|
interface CommentEditorProps {
|
||||||
defaultContent?: any;
|
defaultContent?: any;
|
||||||
@@ -80,13 +73,9 @@ const CommentEditor = forwardRef(
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
TableKit,
|
TableKit,
|
||||||
Attachment.configure({
|
TaskList,
|
||||||
view: AttachmentView,
|
TaskItem.configure({
|
||||||
}),
|
nested: true,
|
||||||
SharedStorage,
|
|
||||||
TiptapImage.configure({
|
|
||||||
view: ImageView,
|
|
||||||
allowBase64: false,
|
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
editorProps: {
|
editorProps: {
|
||||||
|
|||||||
Reference in New Issue
Block a user