add image and table node to comment editor

* fix react error
This commit is contained in:
Philipinho
2026-07-03 20:10:07 +01:00
parent 15f893184e
commit 86687d2bf2
5 changed files with 30 additions and 5 deletions
@@ -134,7 +134,7 @@ export default function ConfluenceImportModal({ opened, onClose }: Props) {
};
const handleNextFromCredentials = async () => {
if (form.validate().hasErrors) return;
if ((await form.validate()).hasErrors) return;
setLoading(true);
setError(null);
try {
@@ -53,7 +53,6 @@ export type ImportStatusResponse = {
importedGroups?: number;
totalRestrictedPages?: number;
importedRestrictedPages?: number;
warnings?: string[];
createdAt?: string;
updatedAt?: string;
error?: string;
@@ -81,7 +80,6 @@ export type ConfluenceImportHistoryItem = {
importedRestrictedPages: number;
cancelled: boolean;
spaceKeys: string[];
warnings: string[];
createdAt: string;
updatedAt: string;
creatorId: string | null;
@@ -3,7 +3,18 @@ import { Placeholder } from "@tiptap/extension-placeholder";
import { StarterKit } from "@tiptap/starter-kit";
import { TextStyle } from "@tiptap/extension-text-style";
import { Color } from "@tiptap/extension-color";
import { Mention, LinkExtension } from "@docmost/editor-ext";
import {
Mention,
LinkExtension,
CustomTable,
TableRow,
TableCell,
TableHeader,
TableView,
TiptapImage,
SharedStorage,
} from "@docmost/editor-ext";
import ImageView from "@/features/editor/components/image/image-view";
import classes from "./comment.module.css";
import { useFocusWithin } from "@mantine/hooks";
import clsx from "clsx";
@@ -70,6 +81,18 @@ const CommentEditor = forwardRef(
return ReactNodeViewRenderer(MentionView);
},
}),
SharedStorage,
CustomTable.configure({
resizable: false,
View: TableView,
}),
TableRow,
TableCell,
TableHeader,
TiptapImage.configure({
view: ImageView,
allowBase64: false,
}),
],
editorProps: {
attributes: {
@@ -53,6 +53,10 @@
margin-block-end: 0;
}
.ProseMirror :global(.tableWrapper) table {
min-width: 100% !important;
}
.actions {
}