feat(ui): replace ChatInput textarea with Tiptap editor
Swap the plain <textarea> for a minimal Tiptap (ProseMirror) editor with IME-safe Enter-to-submit, Shift+Enter newline, placeholder support, and an optional imperative ref (getText/setText/focus/clear). All rich-text extensions are disabled — only plain text is allowed. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
fc6c3e30b3
commit
b74a5ea1a7
4 changed files with 721 additions and 41 deletions
18
packages/ui/src/components/chat-input.css
Normal file
18
packages/ui/src/components/chat-input.css
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
.chat-input-editor .ProseMirror {
|
||||
outline: none;
|
||||
min-height: 2.5rem;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.chat-input-editor .ProseMirror p.is-editor-empty:first-child::before {
|
||||
content: attr(data-placeholder);
|
||||
float: left;
|
||||
pointer-events: none;
|
||||
height: 0;
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
|
||||
.chat-input-editor.is-disabled .ProseMirror {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue