mirror of https://github.com/msgbyte/tailchat
feat: bbcode增加markdown语法支持
parent
b0256228cc
commit
e17dd3f5d4
@ -0,0 +1,11 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Markdown } from '@capital/component';
|
||||||
|
import type { TagProps } from '../bbcode/type';
|
||||||
|
|
||||||
|
export const MarkdownTag: React.FC<TagProps> = React.memo((props) => {
|
||||||
|
const { node } = props;
|
||||||
|
const text = node.content.join('');
|
||||||
|
|
||||||
|
return <Markdown raw={text} />;
|
||||||
|
});
|
||||||
|
MarkdownTag.displayName = 'MarkdownTag';
|
Loading…
Reference in New Issue