2.0.0 • Published 4 years ago
@tuanjs/react-cherry-markdown v2.0.0
react-cherry-markdown
✨ A React Markdown Editor
Getting Started
Install dependencies,
npm i @sjognad/react-cherry-markdownStart the dev server,
npm startBuild documentation,
npm run docs:buildRun test,
npm testBuild library via father-build,
npm run buildExample
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
2.0.0
4 years ago