[WEB-1682] chore: additional document editor extensions (#4905)
* chore: additional document editor extensions * chore: updated document editor hook
This commit is contained in:
parent
adec4e1f2d
commit
55a5c2d383
4 changed files with 50 additions and 2 deletions
|
|
@ -4,9 +4,11 @@ import { EditorProps } from "@tiptap/pm/view";
|
|||
import { IndexeddbPersistence } from "y-indexeddb";
|
||||
import * as Y from "yjs";
|
||||
// extensions
|
||||
import { DragAndDrop, IssueWidget, SlashCommand } from "@/extensions";
|
||||
import { DragAndDrop, IssueWidget } from "@/extensions";
|
||||
// hooks
|
||||
import { TFileHandler, useEditor } from "@/hooks/use-editor";
|
||||
// plane editor extensions
|
||||
import { DocumentEditorAdditionalExtensions } from "@/plane-editor/extensions";
|
||||
// plane editor provider
|
||||
import { CollaborationProvider } from "@/plane-editor/providers";
|
||||
// plane editor types
|
||||
|
|
@ -85,7 +87,6 @@ export const useDocumentEditor = (props: DocumentEditorProps) => {
|
|||
forwardedRef,
|
||||
mentionHandler,
|
||||
extensions: [
|
||||
SlashCommand(fileHandler.upload),
|
||||
DragAndDrop(setHideDragHandleFunction),
|
||||
embedHandler?.issue &&
|
||||
IssueWidget({
|
||||
|
|
@ -94,6 +95,10 @@ export const useDocumentEditor = (props: DocumentEditorProps) => {
|
|||
Collaboration.configure({
|
||||
document: provider.document,
|
||||
}),
|
||||
...DocumentEditorAdditionalExtensions({
|
||||
fileHandler,
|
||||
issueEmbedConfig: embedHandler?.issue,
|
||||
}),
|
||||
],
|
||||
placeholder,
|
||||
tabIndex,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue