fix: fix comment editor

This commit is contained in:
fantasticit 2022-03-22 12:42:31 +08:00
parent 4c9838e29e
commit e211f07794
2 changed files with 2 additions and 13 deletions

View File

@ -1,6 +1,7 @@
import { HocuspocusProvider } from '@hocuspocus/provider';
import Collaboration from '@tiptap/extension-collaboration';
import CollaborationCursor from '@tiptap/extension-collaboration-cursor';
import History from '@tiptap/extension-history';
import { getRandomColor } from 'helpers/color';
import { Document } from './extensions/document';
import { BaseKit } from './basekit';
@ -14,7 +15,7 @@ export const DocumentWithTitle = Document.extend({
content: 'title block+',
});
export { Document };
export { Document, History };
export const DEFAULT_EXTENSION = [...BaseKit];
export const getCollaborationExtension = (provider: HocuspocusProvider) => {

View File

@ -121,19 +121,7 @@ export const CommentMenuBar: React.FC<{ editor: any }> = ({ editor }) => {
<Divider />
<BaseMenu editor={editor} />
<Divider />
<AlignMenu editor={editor} />
<Divider />
<BaseInsertMenu editor={editor} />
</Space>
<BaseBubbleMenu editor={editor} />
<ImageBubbleMenu editor={editor} />
<LinkBubbleMenu editor={editor} />
<BannerBubbleMenu editor={editor} />
<TableBubbleMenu editor={editor} />
</>
);
};