mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
📋 fix(handlePaste): Remove Custom rich-text handling (#3025)
* fix: rich text edge case * fix(useTextarea): removing custom handling fixes RTF slow loading, default behavior with form prefers plain-text
This commit is contained in:
parent
ef76cc195e
commit
803fd63121
1 changed files with 0 additions and 15 deletions
|
|
@ -209,21 +209,6 @@ export default function useTextarea({
|
|||
return;
|
||||
}
|
||||
|
||||
let richText = '';
|
||||
let includedText = '';
|
||||
const { types } = e.clipboardData;
|
||||
|
||||
if (types.indexOf('text/rtf') !== -1 || types.indexOf('Files') !== -1) {
|
||||
e.preventDefault();
|
||||
includedText = e.clipboardData.getData('text/plain');
|
||||
richText = e.clipboardData.getData('text/rtf');
|
||||
}
|
||||
|
||||
if (includedText && (e.clipboardData.files.length > 0 || richText)) {
|
||||
insertTextAtCursor(textAreaRef.current, includedText);
|
||||
forceResize(textAreaRef);
|
||||
}
|
||||
|
||||
if (e.clipboardData.files.length > 0) {
|
||||
setFilesLoading(true);
|
||||
const timestampedFiles: File[] = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue