From 74957fe01488699f1c05996e957221c5ee7b0829 Mon Sep 17 00:00:00 2001 From: fantasticit Date: Tue, 10 May 2022 11:16:35 +0800 Subject: [PATCH] tiptap: fix menus --- .../collaboration/collaboration/menubar.tsx | 2 + .../src/tiptap/editor/hooks/use-active.tsx | 2 + .../editor/menus/background-color/index.tsx | 2 +- .../src/tiptap/editor/menus/bold/index.tsx | 6 +- .../tiptap/editor/menus/callout/bubble.tsx | 18 ++--- .../tiptap/editor/menus/code-block/bubble.tsx | 18 ++--- .../src/tiptap/editor/menus/code/index.tsx | 6 +- .../tiptap/editor/menus/countdown/bubble.tsx | 4 +- .../editor/menus/document-children/bubble.tsx | 3 +- .../menus/document-reference/bubble.tsx | 4 +- .../src/tiptap/editor/menus/iframe/bubble.tsx | 4 +- .../src/tiptap/editor/menus/image/bubble.tsx | 20 +++--- .../src/tiptap/editor/menus/italic/index.tsx | 6 +- .../src/tiptap/editor/menus/link/bubble.tsx | 4 +- .../src/tiptap/editor/menus/mind/bubble.tsx | 21 +++--- .../src/tiptap/editor/menus/redo/index.tsx | 11 ++- .../src/tiptap/editor/menus/strike/index.tsx | 6 +- .../tiptap/editor/menus/subscript/index.tsx | 6 +- .../tiptap/editor/menus/superscript/index.tsx | 6 +- .../src/tiptap/editor/menus/table/bubble.tsx | 22 +++--- .../tiptap/editor/menus/table/col-bubble.tsx | 21 +++--- .../tiptap/editor/menus/table/row-bubble.tsx | 21 +++--- .../src/tiptap/editor/menus/text/index.tsx | 70 +++++++++++++++++++ .../tiptap/editor/menus/underline/index.tsx | 6 +- .../src/tiptap/editor/menus/undo/index.tsx | 11 ++- packages/client/src/tiptap/prose-utils/url.ts | 13 +--- 26 files changed, 204 insertions(+), 109 deletions(-) create mode 100644 packages/client/src/tiptap/editor/menus/text/index.tsx diff --git a/packages/client/src/tiptap/editor/collaboration/collaboration/menubar.tsx b/packages/client/src/tiptap/editor/collaboration/collaboration/menubar.tsx index 81bf872..97cb53d 100644 --- a/packages/client/src/tiptap/editor/collaboration/collaboration/menubar.tsx +++ b/packages/client/src/tiptap/editor/collaboration/collaboration/menubar.tsx @@ -42,6 +42,7 @@ import { DocumentReference } from 'tiptap/editor/menus/document-reference'; import { Image } from 'tiptap/editor/menus/image'; import { Iframe } from 'tiptap/editor/menus/iframe'; import { Table } from 'tiptap/editor/menus/table'; +import { Text } from 'tiptap/editor/menus/text'; import { Mind } from 'tiptap/editor/menus/mind'; const _MenuBar: React.FC<{ editor: Editor }> = ({ editor }) => { @@ -108,6 +109,7 @@ const _MenuBar: React.FC<{ editor: Editor }> = ({ editor }) => {