Home > Web Front-end > JS Tutorial > A graphite document style rich text editor made with Vue.js 2.0+

A graphite document style rich text editor made with Vue.js 2.0+

php中世界最好的语言
Release: 2018-03-07 09:34:51
Original
3954 people have browsed it

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=&#39;config&#39;></smeditor>
Copy after login

Configuration

const config = {  // 
接口
地址
  uploadUrl: &#39;&#39;,  // form 里的 filename
  uploadName: &#39;&#39;,  // 其他参数
  uploadParams: {},  // 上传成功回调
  uploadCallback: (data) => {    console.log(data)    return &#39;blob:
https://
fiddle.jshell.net/00a0b0b4-d19a-4860-9796-137692aef36f&#39;
  },  // 上传失败回调, 可选
  uploadFailed: (err) => {    console.log(err)
  }
}
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template