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
| Name | Default | Type |
|---|---|---|
content | null | string | 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 | true | boolean Toggles editability of the editor |
autofocus | false | boolean Autofocus the editor on mount |
bubbleMenu | false | boolean | any[] Enables bubble menu or provides custom bubble menu items |
bubbleMenuOptions | {} | object Configuration options for the bubble menu |
fixedMenu | false | boolean | any[] Enables fixed menu or provides custom fixed menu items |
floatingMenu | false | boolean | any[] Enables floating menu or provides custom floating menu items |
extensions | [] | any[] Custom TipTap extensions |
starterkitOptions | {} | any Options passed to TipTap StarterKit |
mentions | null | ConfigureMentionOptions Mention extension configuration |
tags | null | any[] | 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
| Slot | Payload |
|---|---|
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
| Event | Payload |
|---|---|
change | [content: string] |
focus | [event: FocusEvent] |
blur | [event: FocusEvent] |
transaction | [editor: object] |