✨ A React Markdown Editor
Install dependencies,
npm i @tuanjs/react-cherry-markdownStart the dev server,
npm startBuild documentation,
npm run docs:buildRun test,
npm testBuild library via father-build,
npm run buildimport React from 'react';
import { CherryEditor } from '@tuanjs/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}
/>
);
};