This time I will bring you a graphite document style rich text made with Vue.js 2.0+Editor, using Vue.js 2.0+ to make a graphite document style rich text editor NotesWhat are the following? Let’s take a look at the actual cases.
The wangEditor I have been using before cannot meet the needs of our editors and PMs, and there are many problems during the use. After the experience of simditor, the effect is not very good, and it is not maintained; the current backend management system technology selection The model has turned to Vue, so there is this wheel;
Function
1. Light, fast 48 KB
2. AutomaticallyAdd pictures Description box (similar to a short book)
3. CopyUpload, batch upload multiple pictures
4.Lightweight backup, restore, preview
5. Streamlined code, suitable for secondary development
6. Functions found in other editors
7. Mobile terminal
Use
// 安装npm install smeditor// 引入import SMEditor from 'smeditor'// 全局组件Vue.use(SMEditor)// 局部组件components: { 'smeditor': SMEditor }// 使用<smeditor :config='config'></smeditor>
Configuration
const config = { // 接口 地址 uploadUrl: '', // form 里的 filename uploadName: '', // 其他参数 uploadParams: {}, // 上传成功回调 uploadCallback: (data) => { console.log(data) return 'blob: https:// fiddle.jshell.net/00a0b0b4-d19a-4860-9796-137692aef36f' }, // 上传失败回调, 可选 uploadFailed: (err) => { console.log(err) } }
I believe you have mastered the methods in the above cases. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
Detailed explanation of the path module of node.js
Using Video.js to implement the H5 live broadcast interface
The above is the detailed content of A graphite document style rich text editor made with Vue.js 2.0+. For more information, please follow other related articles on the PHP Chinese website!