logoAnt Design X

DesignDevelopmentComponentsX SDKX MarkdownPlayground
  • Introduction
  • Code Examples
  • Streaming Rendering
  • Components
  • Themes
  • Plugins
    • Overview
    • LatexFormula
    • HighlightCode
    • MermaidDiagram
    • CustomPlugins

Overview

Resources

Ant Design
Ant Design Charts
Ant Design Pro
Pro Components
Ant Design Mobile
Ant Design Mini
Ant Design Web3
Ant Design Landing-Landing Templates
Scaffolds-Scaffold Market
Umi-React Application Framework
dumi-Component doc generator
qiankun-Micro-Frontends Framework
Ant Motion-Motion Solution
China Mirror 🇨🇳

Community

Awesome Ant Design
Medium
Twitter
yuque logoAnt Design in YuQue
Ant Design in Zhihu
Experience Cloud Blog
seeconf logoSEE Conf-Experience Tech Conference

Help

GitHub
Change Log
FAQ
Bug Report
Issues
Discussions
StackOverflow
SegmentFault

Ant XTech logoMore Products

yuque logoYuQue-Document Collaboration Platform
AntV logoAntV-Data Visualization
Egg logoEgg-Enterprise Node.js Framework
Kitchen logoKitchen-Sketch Toolkit
Galacean logoGalacean-Interactive Graphics Solution
xtech logoAnt Financial Experience Tech
Theme Editor
Made with ❤ by
Ant Group and Ant Design Community

Using plugins enables @ant-design/x-markdown to support more extended features, such as LaTeX, code highlighting, etc.

Plugin Collection

  • HighlightCode

    Highlight the rendering code.
  • Latex

    Rendering mathematical formulas using Latex syntax.
  • Mermaid

    Rendering the Mermaid Chart.

How to Import Plugins

Plugins can be imported from @ant-design/x-markdown/plugins/plugin-name.

tsx
import Latex from '@ant-design/x-markdown/plugins/latex';

Browser Import

In browsers, you can directly import files using script and link tags, with the plugin name as the global variable.

We provide built plugin files in the dist/plugins directory of the npm package, which you can use directly.

html
<script src="**/dist/plugins/latex.min.js"></script>
<script>
const Latex = window.Latex;
</script>

Custom Plugins

Supports implementing all Marked plugins, or creating custom plugins Reference