mirror of
https://github.com/docmost/docmost.git
synced 2026-07-26 21:44:42 +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 () => {
|
const handleNextFromCredentials = async () => {
|
||||||
if (form.validate().hasErrors) return;
|
if ((await form.validate()).hasErrors) return;
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
setError(null);
|
setError(null);
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ export type ImportStatusResponse = {
|
|||||||
importedGroups?: number;
|
importedGroups?: number;
|
||||||
totalRestrictedPages?: number;
|
totalRestrictedPages?: number;
|
||||||
importedRestrictedPages?: number;
|
importedRestrictedPages?: number;
|
||||||
warnings?: string[];
|
|
||||||
createdAt?: string;
|
createdAt?: string;
|
||||||
updatedAt?: string;
|
updatedAt?: string;
|
||||||
error?: string;
|
error?: string;
|
||||||
@@ -81,7 +80,6 @@ export type ConfluenceImportHistoryItem = {
|
|||||||
importedRestrictedPages: number;
|
importedRestrictedPages: number;
|
||||||
cancelled: boolean;
|
cancelled: boolean;
|
||||||
spaceKeys: string[];
|
spaceKeys: string[];
|
||||||
warnings: string[];
|
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
creatorId: string | null;
|
creatorId: string | null;
|
||||||
|
|||||||
@@ -3,7 +3,18 @@ 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 { 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 classes from "./comment.module.css";
|
||||||
import { useFocusWithin } from "@mantine/hooks";
|
import { useFocusWithin } from "@mantine/hooks";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
@@ -70,6 +81,18 @@ const CommentEditor = forwardRef(
|
|||||||
return ReactNodeViewRenderer(MentionView);
|
return ReactNodeViewRenderer(MentionView);
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
SharedStorage,
|
||||||
|
CustomTable.configure({
|
||||||
|
resizable: false,
|
||||||
|
View: TableView,
|
||||||
|
}),
|
||||||
|
TableRow,
|
||||||
|
TableCell,
|
||||||
|
TableHeader,
|
||||||
|
TiptapImage.configure({
|
||||||
|
view: ImageView,
|
||||||
|
allowBase64: false,
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
editorProps: {
|
editorProps: {
|
||||||
attributes: {
|
attributes: {
|
||||||
|
|||||||
@@ -53,6 +53,10 @@
|
|||||||
margin-block-end: 0;
|
margin-block-end: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ProseMirror :global(.tableWrapper) table {
|
||||||
|
min-width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
Submodule apps/server/src/ee updated: 3a080841e4...c6859dbf95
Reference in New Issue
Block a user