diff --git a/client/shared/i18n/langs/en-US/translation.json b/client/shared/i18n/langs/en-US/translation.json index a0829389..c961e053 100644 --- a/client/shared/i18n/langs/en-US/translation.json +++ b/client/shared/i18n/langs/en-US/translation.json @@ -134,6 +134,7 @@ "k5be1a5b0": "Delete role group", "k5bec387": "Unable to get group information", "k5ce4e16d": "Clear", + "k5d1e4cd8": "Custom styles are not supported", "k5d2a6631": "Allow to manage channels", "k5f91e72c": "Built Plugins", "k5fc9ccb6": "Operation too frequently", diff --git a/client/shared/i18n/langs/zh-CN/translation.json b/client/shared/i18n/langs/zh-CN/translation.json index 76d23415..279f86eb 100644 --- a/client/shared/i18n/langs/zh-CN/translation.json +++ b/client/shared/i18n/langs/zh-CN/translation.json @@ -134,6 +134,7 @@ "k5be1a5b0": "删除身份组", "k5bec387": "无法获取到群组信息", "k5ce4e16d": "清除", + "k5d1e4cd8": "不支持自定义样式", "k5d2a6631": "允许管理频道", "k5f91e72c": "内置插件", "k5fc9ccb6": "操作过于频繁", diff --git a/client/web/src/components/Markdown/render.less b/client/web/src/components/Markdown/render.less index f7d0eeea..c07250d3 100644 --- a/client/web/src/components/Markdown/render.less +++ b/client/web/src/components/Markdown/render.less @@ -1,4 +1,6 @@ .tailchat-markdown { + min-height: 24px; + * { user-select: text; } diff --git a/client/web/src/components/Markdown/render.tsx b/client/web/src/components/Markdown/render.tsx index df483b4f..0343df7e 100644 --- a/client/web/src/components/Markdown/render.tsx +++ b/client/web/src/components/Markdown/render.tsx @@ -1,6 +1,6 @@ import { makeAbsoluteUrl } from '@/utils/url-helper'; import React, { useCallback, useMemo } from 'react'; -import { isValidStr, parseUrlStr } from 'tailchat-shared'; +import { isValidStr, parseUrlStr, useTranslation } from 'tailchat-shared'; import { Loadable } from '../Loadable'; import { Image } from 'tailchat-design'; import remarkGfm from 'remark-gfm'; @@ -15,6 +15,7 @@ export const Markdown: React.FC<{ raw: string; baseUrl?: string; }> = React.memo(({ raw, baseUrl }) => { + const { t } = useTranslation(); const transformUrl = useCallback( (url: string) => { url = parseUrlStr(url); @@ -43,6 +44,7 @@ export const Markdown: React.FC<{ preview={true} /> ), + style: () =>
{t('不支持自定义样式')}
, }), [] );