Gathering detailed insights and metrics for react-markdown-editor-lite-plus
Gathering detailed insights and metrics for react-markdown-editor-lite-plus
Gathering detailed insights and metrics for react-markdown-editor-lite-plus
Gathering detailed insights and metrics for react-markdown-editor-lite-plus
a light-weight Markdown editor based on React. 一款轻量的基于React的markdown编辑器
npm install react-markdown-editor-lite-plus
Typescript
Module System
Node Version
NPM Version
TypeScript (89.89%)
Less (6.95%)
JavaScript (1.58%)
CSS (1.58%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1,084 Stars
503 Commits
161 Forks
17 Watchers
6 Branches
16 Contributors
Updated on Jul 11, 2025
Latest Version
1.1.0
Package Id
react-markdown-editor-lite-plus@1.1.0
Unpacked Size
972.21 kB
Size
240.75 kB
File Count
212
NPM Version
6.14.17
Node Version
14.20.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
1
41
来源 react-markdown-editor-lite,修复国际化,问题
在线案例
https://harrychen0506.github.io/react-markdown-editor-lite/
默认配置
可插拔的功能键
1npm install react-markdown-editor-lite-plus --save 2# or 3yarn add react-markdown-editor-lite-plus
基本使用分为以下几步:
1// 导入React、react-markdown-editor-lite,以及一个你喜欢的Markdown渲染器 2import React from 'react'; 3import MarkdownIt from 'markdown-it'; 4import MdEditor from 'react-markdown-editor-lite-plus'; 5// 导入编辑器的样式 6import 'react-markdown-editor-lite-plus/lib/index.css'; 7 8// 注册插件(如果有的话) 9// MdEditor.use(YOUR_PLUGINS_HERE); 10 11// 初始化Markdown解析器 12const mdParser = new MarkdownIt(/* Markdown-it options */); 13 14// 完成! 15function handleEditorChange({ html, text }) { 16 console.log('handleEditorChange', html, text); 17} 18export default props => { 19 return <MdEditor style={{ height: '500px' }} renderHTML={text => mdParser.render(text)} onChange={handleEditorChange} />; 20};
如果你在使用一个服务端渲染框架,例如 Next.js、Gatsby 等,请对编辑器使用客户端渲染。
例如,Next.js 有next/dynamic,Gatsby 有loadable-components
下面是 Next.js 的使用范例:
1import dynamic from 'next/dynamic'; 2import 'react-markdown-editor-lite-plus/lib/index.css'; 3 4const MdEditor = dynamic(() => import('react-markdown-editor-lite-plus'), { 5 ssr: false, 6}); 7 8export default function() { 9 return <MdEditor style={{ height: '500px' }} renderHTML={/* Render function */} />; 10}
与插件一起使用:
1import dynamic from 'next/dynamic'; 2import 'react-markdown-editor-lite-plus/lib/index.css'; 3 4const MdEditor = dynamic( 5 () => { 6 return new Promise(resolve => { 7 Promise.all([ 8 import('react-markdown-editor-lite-plus'), 9 import('./my-plugin'), 10 /** 按照这样加载更多插件,并在下方 use */ 11 ]).then(res => { 12 res[0].default.use(res[1].default); 13 resolve(res[0].default); 14 }); 15 }); 16 }, 17 { 18 ssr: false, 19 }, 20); 21 22export default function() { 23 return <MdEditor style={{ height: '500px' }} renderHTML={/* Render function */} />; 24}
完整示例见此
自 1.1.0 起,你可以在浏览器中使用script
和link
标签直接引入文件,并使用全局变量ReactMarkdownEditorLite
。
注意:ReactMarkdownEditorLite(RMEL) 依赖 react,请确保其在 RMEL 之前引入。
例如,使用 webpack 时,你可以在页面中通过script
引入 ReactMarkdownEditorLite 的 JS 文件,并在 webpack 配置中写:
1externals: { 2 react: 'React', 3 'react-markdown-editor-lite-plus': 'ReactMarkdownEditorLite' 4}
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 5/7 approved changesets -- score normalized to 7
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
97 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More