@tuanjs/react-cherry-markdown
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

react-cherry-markdown

A React Markdown Editor

GitHub Pages

Getting Started

Install dependencies,

npm i @sjognad/react-cherry-markdown

Start the dev server,

npm start

Build documentation,

npm run docs:build

Run test,

npm test

Build library via father-build,

npm run build

Example

import React from 'react';
import { CherryEditor } from '@sjognad/react-cherry-markdown';
import * as echarts from 'echarts';
import MathJax from 'mathjax/es5/tex-svg';

export default () => {
  const md = '## Hello react-cherry-markdown!';
  return (
    <CherryEditor
      engine={{
        syntax: {
          table: {
            enableChart: true,
          },
          // mathBlock: {
          //   engine: 'katex',
          // },
          // inlineMath: {
          //   engine: 'katex',
          // },
        },
      }}
      externals={{
        echarts,
        MathJax,
      }}
      value={md}
    />
  );
};

Configuration

Tencent cherry-markdown configuration

Readme

Keywords

Package Sidebar

Install

npm i @tuanjs/react-cherry-markdown

Weekly Downloads

2

Version

2.0.0

License

MIT

Unpacked Size

9.61 kB

Total Files

8

Last publish

Collaborators

  • wongjorie