TextEditor

A rich text editor based on TipTap for creating and formatting content. Offers intuitive controls, styling options, and smooth editing experience.

Default

Comment Editor

Props

NameDefaultType
content
nullstring | null

Initial editor content (HTML/string). `null` renders an empty editor

placeholder
""string | (() => string)

Placeholder text or dynamic placeholder resolver

editorClass
""string | object | string[]

Custom classes applied to the editor root

editable
trueboolean

Toggles editability of the editor

autofocus
falseboolean

Autofocus the editor on mount

bubbleMenu
falseboolean | any[]

Enables bubble menu or provides custom bubble menu items

bubbleMenuOptions
{}
object

Configuration options for the bubble menu

fixedMenu
falseboolean | any[]

Enables fixed menu or provides custom fixed menu items

floatingMenu
falseboolean | any[]

Enables floating menu or provides custom floating menu items

extensions
[]any[]

Custom TipTap extensions

starterkitOptions
{}
any

Options passed to TipTap StarterKit

mentions
nullConfigureMentionOptions

Mention extension configuration

tags
nullany[] | null

Tag / hashtag configuration

uploadFunction
-((file: File) => Promise<UploadedFile>)

Async file upload handler (used for images, files, etc.)

uploadArgs
-object

Extra arguments passed to the upload function

Slots

SlotPayload
top
{ editor: { contentComponent: { uid: number; type: FunctionalComponent<{}, {}, any, {}> | { [x: stri

editor
{ editor: { contentComponent: { uid: number; type: FunctionalComponent<{}, {}, any, {}> | { [x: stri

bottom
{ editor: { contentComponent: { uid: number; type: FunctionalComponent<{}, {}, any, {}> | { [x: stri

Emit Events

EventPayload
change
[content: string]

focus
[event: FocusEvent]

blur
[event: FocusEvent]

transaction
[editor: object]