mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00: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;
|
const codeString = codeRef.current?.textContent;
|
||||||
if (codeString) {
|
if (codeString) {
|
||||||
setIsCopied(true);
|
setIsCopied(true);
|
||||||
copy(codeString);
|
copy(codeString, { format: 'text/plain' });
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setIsCopied(false);
|
setIsCopied(false);
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export default function useCopyToClipboard({
|
||||||
return acc;
|
return acc;
|
||||||
}, '');
|
}, '');
|
||||||
}
|
}
|
||||||
copy(messageText ?? '');
|
copy(messageText ?? '', { format: 'text/plain' });
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setIsCopied(false);
|
setIsCopied(false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue