documentation/versioned_docs/version-3.xx.xx/api-reference/antd/components/fields/markdown.md
This field lets you display markdown content. It supports GitHub Flavored Markdown.
:::info-tip Swizzle You can swizzle this component to customize it with the refine CLI :::
Let's see how we can use <MarkdownField> in a show page.
import { useShow, IResourceComponentsProps } from "@pankod/refine-core";
import {
Show,
Typography,
// highlight-next-line
MarkdownField,
} from "@pankod/refine-antd";
const { Title, Text } = Typography;
const PostShow: React.FC = () => {
const { queryResult } = useShow<IPost>();
const { data, isLoading } = queryResult;
const record = data?.data;
return (
<Show isLoading={isLoading}>
<Title level={5}>Id</Title>
<Text>{record?.id}</Text>
<Title level={5}>Content</Title>
<MarkdownField value={record?.content} />
</Show>
);
};
interface IPost {
id: number;
title: string;
content: string;
}
// visible-block-end
render(
<RefineAntdDemo
initialRoutes={["/posts/show/123"]}
resources={[
{
name: "posts",
list: () => (
<RefineAntd.List>
<p>List page here...</p>
</RefineAntd.List>
),
show: PostShow,
},
]}
/>,
);