From c9d4fd51272c27ff566b8b79cb693e8af1a216ce Mon Sep 17 00:00:00 2001 From: fantasticit Date: Mon, 25 Apr 2022 10:37:25 +0800 Subject: [PATCH] tiptap: improve document-reference menu --- packages/client/src/tiptap/menubar.tsx | 2 + .../menus/document-reference/bubble.tsx | 77 +++++++++++++++ .../tiptap/menus/document-reference/index.tsx | 15 +++ .../document-reference/index.module.scss | 17 +--- .../wrappers/document-reference/index.tsx | 95 ++++++++----------- 5 files changed, 132 insertions(+), 74 deletions(-) create mode 100644 packages/client/src/tiptap/menus/document-reference/bubble.tsx create mode 100644 packages/client/src/tiptap/menus/document-reference/index.tsx diff --git a/packages/client/src/tiptap/menubar.tsx b/packages/client/src/tiptap/menubar.tsx index 32ae1f9..ef0300d 100644 --- a/packages/client/src/tiptap/menubar.tsx +++ b/packages/client/src/tiptap/menubar.tsx @@ -34,6 +34,7 @@ import { Search } from './menus/search'; import { Banner } from './menus/banner'; import { Countdonw } from './menus/countdown'; +import { DocumentReference } from './menus/document-reference'; import { Image } from './menus/image'; import { Iframe } from './menus/iframe'; import { Table } from './menus/table'; @@ -89,6 +90,7 @@ export const MenuBar: React.FC<{ editor: any }> = ({ editor }) => { +