mirror of
https://github.com/docmost/docmost.git
synced 2026-07-06 22:44:29 +10:00
add image and table node to comment editor
* fix react error
This commit is contained in:
@@ -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 {
|
||||
|
||||
}
|
||||
|
||||
+1
-1
Submodule apps/server/src/ee updated: 3a080841e4...c6859dbf95
Reference in New Issue
Block a user