mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-23 20:00:15 +01:00
📝 feat: Improved Textarea Functionality (#1942)
* feat: paste plain text from apps with rich paste data, improved edit message textarea, improved height resizing for long text * feat(EditMessage): autofocus * chore: retain user text color when entering edit mode
This commit is contained in:
parent
de0cee3f56
commit
c52ea9490b
3 changed files with 91 additions and 36 deletions
|
|
@ -21,7 +21,7 @@ export default function Textarea({
|
|||
select: (data) => mergeFileConfig(data),
|
||||
});
|
||||
const {
|
||||
inputRef,
|
||||
textAreaRef,
|
||||
handlePaste,
|
||||
handleKeyUp,
|
||||
handleKeyDown,
|
||||
|
|
@ -31,7 +31,7 @@ export default function Textarea({
|
|||
const endpointFileConfig = fileConfig.endpoints[endpoint ?? ''];
|
||||
return (
|
||||
<TextareaAutosize
|
||||
ref={inputRef}
|
||||
ref={textAreaRef}
|
||||
autoFocus
|
||||
value={value}
|
||||
disabled={!!disabled}
|
||||
|
|
@ -52,7 +52,7 @@ export default function Textarea({
|
|||
: 'pl-3 md:pl-4',
|
||||
'm-0 w-full resize-none border-0 bg-transparent py-[10px] pr-10 placeholder-black/50 focus:ring-0 focus-visible:ring-0 dark:bg-transparent dark:placeholder-white/50 md:py-3.5 md:pr-12 ',
|
||||
removeFocusOutlines,
|
||||
'max-h-52',
|
||||
'max-h-[65vh] md:max-h-[85vh]',
|
||||
)}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue