chore: move headings list extension to the document editor (#5711)
This commit is contained in:
parent
d253933995
commit
ade03e9f8f
3 changed files with 5 additions and 3 deletions
|
|
@ -19,7 +19,6 @@ import {
|
||||||
CustomQuoteExtension,
|
CustomQuoteExtension,
|
||||||
CustomTypographyExtension,
|
CustomTypographyExtension,
|
||||||
DropHandlerExtension,
|
DropHandlerExtension,
|
||||||
HeadingListExtension,
|
|
||||||
ImageExtension,
|
ImageExtension,
|
||||||
ListKeymap,
|
ListKeymap,
|
||||||
Table,
|
Table,
|
||||||
|
|
@ -167,5 +166,4 @@ export const CoreEditorExtensions = ({
|
||||||
includeChildren: true,
|
includeChildren: true,
|
||||||
}),
|
}),
|
||||||
CharacterCount,
|
CharacterCount,
|
||||||
HeadingListExtension,
|
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { HocuspocusProvider } from "@hocuspocus/provider";
|
||||||
import Collaboration from "@tiptap/extension-collaboration";
|
import Collaboration from "@tiptap/extension-collaboration";
|
||||||
import { IndexeddbPersistence } from "y-indexeddb";
|
import { IndexeddbPersistence } from "y-indexeddb";
|
||||||
// extensions
|
// extensions
|
||||||
import { SideMenuExtension } from "@/extensions";
|
import { HeadingListExtension, SideMenuExtension } from "@/extensions";
|
||||||
// hooks
|
// hooks
|
||||||
import { useEditor } from "@/hooks/use-editor";
|
import { useEditor } from "@/hooks/use-editor";
|
||||||
// plane editor extensions
|
// plane editor extensions
|
||||||
|
|
@ -73,6 +73,7 @@ export const useCollaborativeEditor = (props: TCollaborativeEditorProps) => {
|
||||||
aiEnabled: !disabledExtensions?.includes("ai"),
|
aiEnabled: !disabledExtensions?.includes("ai"),
|
||||||
dragDropEnabled: true,
|
dragDropEnabled: true,
|
||||||
}),
|
}),
|
||||||
|
HeadingListExtension,
|
||||||
Collaboration.configure({
|
Collaboration.configure({
|
||||||
document: provider.document,
|
document: provider.document,
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ import { useEffect, useLayoutEffect, useMemo } from "react";
|
||||||
import { HocuspocusProvider } from "@hocuspocus/provider";
|
import { HocuspocusProvider } from "@hocuspocus/provider";
|
||||||
import Collaboration from "@tiptap/extension-collaboration";
|
import Collaboration from "@tiptap/extension-collaboration";
|
||||||
import { IndexeddbPersistence } from "y-indexeddb";
|
import { IndexeddbPersistence } from "y-indexeddb";
|
||||||
|
// extensions
|
||||||
|
import { HeadingListExtension } from "@/extensions";
|
||||||
// hooks
|
// hooks
|
||||||
import { useReadOnlyEditor } from "@/hooks/use-read-only-editor";
|
import { useReadOnlyEditor } from "@/hooks/use-read-only-editor";
|
||||||
// types
|
// types
|
||||||
|
|
@ -56,6 +58,7 @@ export const useReadOnlyCollaborativeEditor = (props: TReadOnlyCollaborativeEdit
|
||||||
editorClassName,
|
editorClassName,
|
||||||
extensions: [
|
extensions: [
|
||||||
...(extensions ?? []),
|
...(extensions ?? []),
|
||||||
|
HeadingListExtension,
|
||||||
Collaboration.configure({
|
Collaboration.configure({
|
||||||
document: provider.document,
|
document: provider.document,
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue