lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
44.1k stars 9.86k forks source link

[Bug] 深色模式下鼠标选中复制文本会保留了字体颜色和背景颜色 #3508

Open leter opened 2 months ago

leter commented 2 months ago

📦 部署环境

Docker

📌 软件版本

v1.11.7

💻 系统环境

Windows

🌐 浏览器

Chrome

🐛 问题描述

深色模式下鼠标选中复制对话框文本至 Word 等文档时,保留的字体颜色和背景颜色影响了直接使用,需先复制到记事本进行格式转换。建议优化复制功能,去除字体和背景颜色,实现无缝粘贴。

📷 复现步骤

🚦 期望结果

直接复制markdown 格式的纯文本

📝 补充信息

No response

lobehubbot commented 2 months ago

👀 @leter

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

lobehubbot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


📦 Deployment environment

Docker

📌 Software version

v1.11.7

💻 System environment

Windows

🌐 Browser

Chrome

🐛 Problem description

When you select the copy dialog box text to a document such as Word in dark mode, the retained font color and background color affect direct use, and you need to copy it to Notepad first for format conversion. It is recommended to optimize the copy function, remove fonts and background colors, and achieve seamless pasting.

📷 Steps to reproduce

🚦 Expected results

Directly copy plain text in markdown format

📝 Supplementary information

No response

sxjeru commented 2 months ago

这是富文本特性,或许不该由 lobechat 作出变更。 可以考虑修改 word 选项。

image

leter commented 2 months ago

@sxjeru 但是我在claude和chatgpt的深色模式下用鼠标选中文本复制到飞书和word是纯文本格式的, 没有任何富文本特性, 这个应该在技术上是可实现的

lobehubbot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@sxjeru But I used the mouse to select text in the dark mode of claude and chatgpt and copied it to Feishu and Word. The format is plain text without any rich text features. This should be technically feasible.

sxjeru commented 2 months ago

初步看了下,从 chatgpt 复制也会携带样式,但字体颜色仍然是黑色,应该是其用了外部样式表的缘故。

下图是 chatgpt 部分 css,若取消勾选第一项会发现文字颜色变为黑色,看来是这里覆盖了原本的颜色。

image

而 lobechat 样式如下图。

image

lobehubbot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


After a preliminary look, copying from chatgpt will also carry the style, but the font color is still black. This should be because it uses an external style sheet.

The picture below is part of chatgpt css. If you uncheck the first item, you will find that the text color changes to black. It seems that the original color is covered here.

image

The lobechat style is as shown below.

image

Wxh16144 commented 2 months ago

这是富文本特性,或许不该由 lobechat 作出变更。

+1

lobehubbot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


This is a rich text feature and should probably not be changed by lobechat.

+1

leter commented 2 months ago

@sxjeru 确实是这样, 对于全部软件开暗黑模式的用户来说比较好用, 怀疑他们是故意这样的, 哈哈, 可能它们团队的人员也出现过这样的困扰

lobehubbot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@sxjeru This is indeed the case. It is easier to use for users who enable dark mode on all software. I suspect they did this intentionally, haha. Maybe their team members have also had such troubles.