chatgpt-web icon indicating copy to clipboard operation
chatgpt-web copied to clipboard

feat: 添加显示用于原文的选项

Open yilozt opened this issue 1 year ago • 9 comments

最终的功能大概是这样子:

  • 在弹出的菜单里添加一个选项来显示原文:

    渲染结果 显示原文
    image image
  • 输入的内容会以 Markdown 渲染(这样整体观感会和谐一些)

    image

Closes #671

yilozt avatar Mar 18 '23 06:03 yilozt

看起来很不错,不过第二个功能我觉得用户输入还是不应该使用 markdown 进行渲染。

Chanzhaoyu avatar Mar 19 '23 04:03 Chanzhaoyu

现在的话,用户的输入会显示成原文,但在弹出菜单里保留了渲染成 Markdown 的选项。@Chanzhaoyu

yilozt avatar Mar 19 '23 05:03 yilozt

现在的话,用户的输入会显示成原文,但在弹出菜单里保留了渲染成 Markdown 的选项。@Chanzhaoyu

Ok,我明天用电脑看下。可以帮忙把「繁体中文」也补充下吗

Chanzhaoyu avatar Mar 19 '23 11:03 Chanzhaoyu

@PeterDaveHello Hello,请问「预览」和「显示原文」的繁体和简体一样吗?

Chanzhaoyu avatar Mar 19 '23 11:03 Chanzhaoyu

已经添加

yilozt avatar Mar 19 '23 11:03 yilozt

@PeterDaveHello Hello,请问「预览」和「显示原文」的繁体和简体一样吗?

@Chanzhaoyu 👍

PeterDaveHello avatar Mar 19 '23 16:03 PeterDaveHello

@yilozt 深色模式下样式有点问题

Chanzhaoyu avatar Mar 20 '23 08:03 Chanzhaoyu

现在应该是正常了:

ChatGPT 输出

暗色 亮色
image image
image image

用户输入:

暗色 亮色

yilozt avatar Mar 20 '23 11:03 yilozt

感觉可以将 Markdown 里 h1 h2 h3 h4 下面的横线去掉,因为现在渲染用户输入的 Markdown 的话,绿色的背景就显得有点突兀了。

image

yilozt avatar Mar 20 '23 11:03 yilozt

用户输入渲染成 markdow 还是有 xss 风险,我决定还是只给回复做显示原文。

Chanzhaoyu avatar Mar 21 '23 00:03 Chanzhaoyu

用户输入渲染成 markdow 还是有 xss 风险,我决定还是只给回复做显示原文。

用户message markdown 渲染可以是一个config? 这样看着更和谐统一一些

xingfanxia avatar Mar 21 '23 12:03 xingfanxia