diff --git a/client/web/plugins/com.msgbyte.bbcode/src/tags/MarkdownTag.tsx b/client/web/plugins/com.msgbyte.bbcode/src/tags/MarkdownTag.tsx new file mode 100644 index 00000000..1883e3d9 --- /dev/null +++ b/client/web/plugins/com.msgbyte.bbcode/src/tags/MarkdownTag.tsx @@ -0,0 +1,11 @@ +import React from 'react'; +import { Markdown } from '@capital/component'; +import type { TagProps } from '../bbcode/type'; + +export const MarkdownTag: React.FC = React.memo((props) => { + const { node } = props; + const text = node.content.join(''); + + return ; +}); +MarkdownTag.displayName = 'MarkdownTag'; diff --git a/client/web/plugins/com.msgbyte.bbcode/src/tags/__all__.ts b/client/web/plugins/com.msgbyte.bbcode/src/tags/__all__.ts index 5017451c..7abc5dfb 100644 --- a/client/web/plugins/com.msgbyte.bbcode/src/tags/__all__.ts +++ b/client/web/plugins/com.msgbyte.bbcode/src/tags/__all__.ts @@ -5,6 +5,7 @@ import { MentionTag } from './MentionTag'; import { PlainText } from './PlainText'; import { UrlTag } from './UrlTag'; import { EmojiTag } from './EmojiTag'; +import { MarkdownTag } from './MarkdownTag'; import './styles.less'; @@ -14,3 +15,4 @@ registerBBCodeTag('img', ImgTag); registerBBCodeTag('code', CodeTag); registerBBCodeTag('at', MentionTag); registerBBCodeTag('emoji', EmojiTag); +registerBBCodeTag('markdown', MarkdownTag); diff --git a/client/web/src/plugin/component/index.tsx b/client/web/src/plugin/component/index.tsx index f9e89f71..60293832 100644 --- a/client/web/src/plugin/component/index.tsx +++ b/client/web/src/plugin/component/index.tsx @@ -48,3 +48,4 @@ export { Emoji } from '@/components/Emoji'; export { PortalAdd, PortalRemove } from '@/components/Portal'; export { ErrorBoundary } from '@/components/ErrorBoundary'; export { UserName } from '@/components/UserName'; +export { Markdown } from '@/components/Markdown';