light

😲 md-editor-rt

Markdown 编辑器,React 版本,使用 jsx 和 typescript 语法开发,支持切换主题、prettier 美化文本等。

🤖 基本演示

加粗,斜体,删除线,上标26,下标1,inline code,超链接

原生 HTML 默认关闭。<u>下划线</u> 等写法会显示为文本,开启方式见 markdownItConfig。

引用:《I Have a Dream》

  1. So even though we face the difficulties of today and tomorrow, I still have a dream.
  2. It is a dream deeply rooted in the American dream.
  3. I have a dream that one day this nation will rise up.
  • 周五
  • 周六
  • 周天
图片

🤗 代码演示

js 复制代码
import { useState } from 'react';
import { MdEditor } from 'md-editor-rt';
import 'md-editor-rt/lib/style.css';

export default () => {
  const [text, setText] = useState('');
  return <MdEditor value={text} onChange={setText} />;
};

🖨 文本演示

依照普朗克长度这项单位,目前可观测的宇宙的直径估计值(直径约 930 亿光年,即 8.8 × 1026 米)即为 5.4 × 1061倍普朗克长度。而可观测宇宙体积则为 8.4 × 10184立方普朗克长度(普朗克体积)。

📈 表格演示

表头 1 表头 2 表头 3
左对齐 中间对齐 右对齐

📏 公式

行内:x+y^{2x}

\sqrt[3]{x}

🧬 图表

mermaid

flowchart TD Start --> Stop

echarts

{ tooltip: { trigger: 'axis' }, xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }, yAxis: { type: 'value' }, series: [ { data: [150, 230, 224, 218, 135, 147, 260], type: 'line' } ] }

🪄 提示

支持的类型

note、abstract、info、tip、success、question、warning、failure、danger、bug、example、quote、hint、caution、error、attention

☘️ 占个坑@!

没了


示例中的标记、emoji、预览和时间扩展组件源码:components