Refine v5 is here! 🎉
shadcn/ui Integration 🚀
Version: 5.xx.xx
Swizzle Ready
Markdown
This field lets you display markdown content. It supports GitHub Flavored Markdown.
Good to know:
You can swizzle this component to customize it with the Refine CLI
Usage
Let's see how we can use <MarkdownField> in a show page.
localhost:3000/posts/show/123
import { useShow } from "@refinedev/core";
import { Show, MarkdownField } from "@refinedev/mantine";
import { Title, Text } from "@mantine/core";
const PostShow: React.FC = () => {
  const { result: post, query } = useShow<IPost>();
  const { data, isLoading } = query;
  return (
    <Show isLoading={isLoading}>
      <Title order={5}>Id</Title>
      <Text mt="sm">{post?.id}</Text>
      <Title mt="sm" order={5}>
        Content
      </Title>
      <MarkdownField value={post?.content} />
    </Show>
  );
};
interface IPost {
  id: number;
  content: string;
}
Was this helpful?
API Reference
Properties
| Property | Type | Description | 
|---|---|---|
| value |  | Markdown data to render | 
Was this helpful?