diff --git a/ui/packages/editor/src/extensions/text/index.ts b/ui/packages/editor/src/extensions/text/index.ts index b3d0a3889..0d41fc388 100644 --- a/ui/packages/editor/src/extensions/text/index.ts +++ b/ui/packages/editor/src/extensions/text/index.ts @@ -1,6 +1,7 @@ import ColorBubbleItem from "@/extensions/color/ColorBubbleItem.vue"; import HighlightBubbleItem from "@/extensions/highlight/HighlightBubbleItem.vue"; import LinkBubbleButton from "@/extensions/link/LinkBubbleButton.vue"; +import { RangeSelection } from "@/extensions/range-selection"; import { i18n } from "@/locales"; import type { EditorState } from "@/tiptap/pm"; import { isActive, isTextSelection } from "@/tiptap/vue-3"; @@ -56,7 +57,10 @@ const Text = TiptapText.extend({ return false; } - if (!isTextSelection(selection)) { + if ( + !isTextSelection(selection) && + !(selection instanceof RangeSelection) + ) { return false; }