mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
📋 refactor: Prevent RTF Paste to Clipboard Only Plain Text (#3179)
This commit is contained in:
parent
c99cf1b4b1
commit
dd563e0796
2 changed files with 2 additions and 2 deletions
|
|
@ -33,7 +33,7 @@ const CodeBar: React.FC<CodeBarProps> = React.memo(({ lang, codeRef, error, plug
|
|||
const codeString = codeRef.current?.textContent;
|
||||
if (codeString) {
|
||||
setIsCopied(true);
|
||||
copy(codeString);
|
||||
copy(codeString, { format: 'text/plain' });
|
||||
|
||||
setTimeout(() => {
|
||||
setIsCopied(false);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export default function useCopyToClipboard({
|
|||
return acc;
|
||||
}, '');
|
||||
}
|
||||
copy(messageText ?? '');
|
||||
copy(messageText ?? '', { format: 'text/plain' });
|
||||
|
||||
setTimeout(() => {
|
||||
setIsCopied(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue