Skip to content

Commit 06732d3

Browse files
committed
MarkdownPreview: перенос строк для длинных ссылок
1 parent 72997a0 commit 06732d3

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

hwproj.front/src/components/Common/MarkdownEditor.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ const MarkdownPreview: FC<MarkdownPreviewProps> = (props) => <MDEditor.Markdown
5959
color: props.textColor ?? "inherit",
6060
paddingBottom: '15px'
6161
}}
62+
components={{
63+
a: ({ node, ...props }) => (
64+
<a
65+
{...props}
66+
style={{
67+
wordBreak: 'break-all',
68+
display: 'inline-block',
69+
maxWidth: '100%'
70+
}}
71+
/>
72+
),
73+
}}
6274
wrapperElement={{
6375
"data-color-mode": "light"
6476
}}

0 commit comments

Comments
 (0)