├── README.MD
├── demo
└── Demo.vue
├── package.json
└── src
└── Editor.vue
/README.MD:
--------------------------------------------------------------------------------
1 | # vue-editor
2 |
3 | Editor for Vue2.0 , Base on wangEditor v2.x
4 |
5 | #### notice
6 |
7 | I don't suggest you use wangeditor v3.0 in your production now
8 | because it's not very stable, such as the user interface, the upload image and so on.
9 | choose wangeditor v2.0 first, if you do not want to trouble
10 |
11 | #### install
12 |
13 | npm
14 |
15 | npm install tt-vue-editor
16 |
17 | yarn
18 |
19 | yarn add tt-vue-editor
20 |
21 | #### how to use
22 |
23 |
24 | template
25 |
26 |
30 |
31 |
32 | script
33 |
34 | import Editor from 'tt-vue-editor'
35 | export default {
36 | data() {
37 | return {
38 | // input content to editor
39 | content: 'base on wangeditor',
40 | // output content from editor
41 | result: '',
42 | // set image upload api url
43 | path: '/api/v1/help/upload/wangEditorH5File'
44 | }
45 | },
46 | methods: {
47 | submit() {
48 | console.log(this.result)
49 | }
50 | },
51 | components: {
52 | 'v-editor': Editor
53 | }
54 | }
55 |
56 | remark
57 |
58 | check the demo or create a issues
59 |
--------------------------------------------------------------------------------
/demo/Demo.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
34 |
35 |
37 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tt-vue-editor",
3 | "version": "2.1.26",
4 | "description": "a vue componet base on wangEditor",
5 | "main": "./src/Editor.vue",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git+https://github.com/jiangyoucai/vue-editor.git"
12 | },
13 | "keywords": [
14 | "vue-editor",
15 | "editor",
16 | "wangeditor"
17 | ],
18 | "author": "https://github.com/jiangyoucai",
19 | "license": "ISC",
20 | "bugs": {
21 | "url": "https://github.com/jiangyoucai/vue-editor/issues"
22 | },
23 | "homepage": "https://github.com/jiangyoucai/vue-editor#readme"
24 | }
--------------------------------------------------------------------------------
/src/Editor.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
31 |
42 |
--------------------------------------------------------------------------------