medium-editor
是一个富文本编辑器。
medium-editor
官网:https://yabwe.github.io/medium-editor
medium-editor
在GitHub上的网址:https://github.com/yabwe/medium-editor
jsDelivr⤵︎
<link href="https://cdn.jsdelivr.net/npm/medium-editor@5.23.3/dist/css/medium-editor.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/medium-editor@5.23.3/dist/css/themes/default.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/medium-editor@5.23.3/dist/js/medium-editor.min.js"></script>
BootCDN⤵︎
<link href="https://cdn.bootcss.com/medium-editor/5.23.3/css/medium-editor.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/medium-editor/5.23.3/css/themes/default.min.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/medium-editor/5.23.3/js/medium-editor.min.js"></script>
step1、通过包管理器
安装medium-editor
包管理器 | 安装命令 |
---|---|
bower | bower install medium-editor --save |
npm | npm install medium-editor --save |
yarn | yarn add medium-editor |
step2、在代码中引入CSS和JavaScript
<link href="/bower_components/medium-editor/dist/medium-editor.min.css" rel="stylesheet">
<link href="/bower_components/medium-editor/dist/themes/default.min.css" rel="stylesheet">
<script src="/bower_components/medium-editor/dist/medium-editor.min.js"></script>
<script>
var editor = new MediumEditor('.editable');
</script>