mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-04 20:00:00 +08:00
feat(RichEditor): add underline extension to enhance text formatting options
This commit is contained in:
parent
c2fe2160b5
commit
ed6bfeca77
@ -16,6 +16,7 @@ import {
|
|||||||
TableOfContents
|
TableOfContents
|
||||||
} from '@tiptap/extension-table-of-contents'
|
} from '@tiptap/extension-table-of-contents'
|
||||||
import Typography from '@tiptap/extension-typography'
|
import Typography from '@tiptap/extension-typography'
|
||||||
|
import Underline from '@tiptap/extension-underline'
|
||||||
import { Markdown } from '@tiptap/markdown'
|
import { Markdown } from '@tiptap/markdown'
|
||||||
import { useEditor, useEditorState } from '@tiptap/react'
|
import { useEditor, useEditorState } from '@tiptap/react'
|
||||||
import StarterKit from '@tiptap/starter-kit'
|
import StarterKit from '@tiptap/starter-kit'
|
||||||
@ -213,6 +214,7 @@ export const useRichEditor = (options: UseRichEditorOptions = {}): UseRichEditor
|
|||||||
onLinkHoverEnd: handleLinkHoverEnd,
|
onLinkHoverEnd: handleLinkHoverEnd,
|
||||||
editable: editable
|
editable: editable
|
||||||
}),
|
}),
|
||||||
|
Underline,
|
||||||
TableOfContents.configure({
|
TableOfContents.configure({
|
||||||
getIndex: getHierarchicalIndexes,
|
getIndex: getHierarchicalIndexes,
|
||||||
onUpdate(content) {
|
onUpdate(content) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user