From ed6bfeca77279f121d44ef4c1b6ffdcbd5ebf268 Mon Sep 17 00:00:00 2001 From: suyao Date: Tue, 28 Oct 2025 20:19:29 +0800 Subject: [PATCH] feat(RichEditor): add underline extension to enhance text formatting options --- src/renderer/src/components/RichEditor/useRichEditor.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/renderer/src/components/RichEditor/useRichEditor.ts b/src/renderer/src/components/RichEditor/useRichEditor.ts index 5510626da7..e2310aa155 100644 --- a/src/renderer/src/components/RichEditor/useRichEditor.ts +++ b/src/renderer/src/components/RichEditor/useRichEditor.ts @@ -16,6 +16,7 @@ import { TableOfContents } from '@tiptap/extension-table-of-contents' import Typography from '@tiptap/extension-typography' +import Underline from '@tiptap/extension-underline' import { Markdown } from '@tiptap/markdown' import { useEditor, useEditorState } from '@tiptap/react' import StarterKit from '@tiptap/starter-kit' @@ -213,6 +214,7 @@ export const useRichEditor = (options: UseRichEditorOptions = {}): UseRichEditor onLinkHoverEnd: handleLinkHoverEnd, editable: editable }), + Underline, TableOfContents.configure({ getIndex: getHierarchicalIndexes, onUpdate(content) {