Skip to content

Commit c97d337

Browse files
committed
Update document & remove examples
1 parent 90ef83f commit c97d337

File tree

10 files changed

+47
-738
lines changed

10 files changed

+47
-738
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11

22
### 中文用户注意:
3-
4-
1. 尽量用英文描述你的 issue
3+
1. 尽量用英文描述你的 Issue,你的问题是面向世界的
54
2. 不要把内容堆彻在标题上,逻辑清晰地写在内容区
65
3. 贴代码要提前格式化好,有颜色高亮那种,贴文本,不要贴图片
7-
4. 提问题前,必须仔细阅读 REMADE.md + 在已关闭的问题中寻找与自身相关的问题,90% 的可能它已经被解决
8-
5. **如果无法做到提一个合格、优秀的问题,则问题会被 close + block**
6+
4. 提问题前,务必仔细阅读 REMADE.md;在已关闭的问题中寻找与自身相关的问题,90% 的可能它已经被解决
97

108
### BUG REPORT TEMPLATE
119

@@ -17,6 +15,6 @@
1715

1816
#### Steps to reproduce
1917

20-
#### What is Expected?
18+
#### What is Expected?
2119

22-
#### What is actually happening?
20+
#### What is actually happening?

README.md

Lines changed: 43 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,33 @@
44
[![GitHub forks](https://img.shields.io/github/forks/surmon-china/vue-quill-editor.svg?style=flat-square)](https://github.com/surmon-china/vue-quill-editor/network)
55
[![GitHub last commit](https://img.shields.io/github/last-commit/google/skia.svg?style=flat-square)](https://github.com/surmon-china/vue-quill-editor)
66
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](https://github.com/surmon-china/vue-quill-editor)
7-
[![Twitter](https://img.shields.io/twitter/url/https/github.com/surmon-china/vue-quill-editor.svg?style=flat-square)](https://twitter.com/intent/tweet?url=https://github.com/surmon-china/vue-quill-editor)
8-
[![](https://badge.juejin.im/entry/5852b6fc61ff4b006c89b49d/likes.svg?style=flat-square)](https://juejin.im/entry/5852b6fc61ff4b006c89b49d/detail)
97

108
[![NPM](https://nodei.co/npm/vue-quill-editor.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/vue-quill-editor/)
119
[![NPM](https://nodei.co/npm-dl/vue-quill-editor.png?months=9&height=3)](https://nodei.co/npm/vue-quill-editor/)
1210

1311

1412
# Vue-Quill-Editor
15-
🍡Quill editor component for Vue, support SPA and SSR.
1613

17-
基于 Quill、适用于 Vue 的富文本编辑器,支持服务端渲染和单页应用。
14+
🍡[Quill](https://github.com/quilljs/quill) editor component for Vue.
1815

16+
基于 [Quill](https://github.com/quilljs/quill)、适用于 Vue 的富文本编辑器,支持服务端渲染和单页应用。
1917

20-
## Example
2118

22-
[Demo Page](https://surmon-china.github.io/vue-quill-editor/)
19+
### Example
2320

24-
[CDN Example](https://jsfiddle.net/tng9r8j3/)
21+
- [Component example page](https://surmon-china.github.io/vue-quill-editor/)
22+
- [CDN example page](https://jsfiddle.net/tng9r8j3/)
2523

26-
[Nuxt.js/SSR example code](https://github.com/surmon-china/vue-quill-editor/blob/master/examples/nuxt-ssr-example)
2724

28-
#### Projects Using Vue-Quill-Editor
29-
[Tamiat CMS](https://github.com/tamiat/tamiat/)
25+
### Install
3026

27+
**NPM**
3128

32-
## Install
29+
``` bash
30+
npm install vue-quill-editor --save
31+
```
3332

34-
#### CDN
33+
**CDN**
3534

3635
``` html
3736
<link rel="stylesheet" href="path/to/quill.core.css"/>
@@ -45,15 +44,9 @@
4544
</script>
4645
```
4746

48-
#### NPM
49-
50-
``` bash
51-
npm install vue-quill-editor --save
52-
```
53-
5447
### Mount
5548

56-
#### mount with global
49+
#### Mount with global
5750

5851
``` javascript
5952
import Vue from 'vue'
@@ -67,7 +60,7 @@ import 'quill/dist/quill.bubble.css'
6760
Vue.use(VueQuillEditor, /* { default global options } */)
6861
```
6962

70-
#### mount with component
63+
#### Mount with local component
7164

7265
```javascript
7366
// require styles
@@ -84,97 +77,44 @@ export default {
8477
}
8578
```
8679

87-
#### mount with ssr
80+
#### Mount with SSR
8881

89-
```javascript
90-
// if used in nuxt.js/ssr, you should keep require it only in browser build environment
91-
if (process.browser) {
92-
const VueQuillEditor = require('vue-quill-editor/dist/ssr')
93-
Vue.use(VueQuillEditor, /* { default global options } */)
94-
}
95-
```
82+
View [Nuxt.js example code](https://github.com/surmon-china/surmon-china.github.io/tree/source/projects/vue-quill-editor/nuxt).
9683

97-
#### register quill module
84+
### Register Quill module
9885

9986
```javascript
100-
// register quill modules, you need to introduce and register before the vue program is instantiated
10187
import Quill from 'quill'
10288
import yourQuillModule from '../yourModulePath/yourQuillModule.js'
10389
Quill.register('modules/yourQuillModule', yourQuillModule)
104-
```
105-
106-
### Difference(使用方法的区别)
107-
108-
**SSR and the only difference in the use of the SPA:**
109-
- SPA worked by the `component`, find quill instance by `ref attribute`.
110-
- SSR worked by the `directive`, find quill instance by `directive arg`.
111-
- Other configurations, events are the same.
112-
113-
### SSR
114-
115-
``` vue
116-
<!-- You can custom the "myQuillEditor" name used to find the quill instance in current component -->
117-
<template>
118-
<!-- bidirectional data binding(双向数据绑定) -->
119-
<div class="quill-editor"
120-
v-model="content"
121-
v-quill:myQuillEditor="editorOption">
122-
</div>
123-
124-
<!-- Or manually control the data synchronization(手动控制数据流) -->
125-
<div class="quill-editor"
126-
:content="content"
127-
@change="onEditorChange($event)"
128-
v-quill:myQuillEditor="editorOption">
129-
</div>
130-
</template>
13190

132-
<script>
133-
export default {
134-
data() {
135-
return {
136-
content: '<p>example content</p>',
137-
editorOption: { /* quill options */ }
138-
}
139-
},
140-
mounted() {
141-
console.log('this is current quill instance object', this.myQuillEditor)
142-
},
143-
methods: {
144-
onEditorChange(event) {
145-
console.log('onEditorChange')
146-
}
147-
},
148-
// Omit the same parts as in the following component sample code
149-
// ...
150-
}
151-
</script>
91+
// Vue app...
15292
```
15393

154-
155-
### SPA
94+
### Component
15695

15796
``` vue
15897
<template>
159-
<!-- bidirectional data binding(双向数据绑定) -->
160-
<quill-editor v-model="content"
161-
ref="myQuillEditor"
162-
:options="editorOption"
163-
@blur="onEditorBlur($event)"
164-
@focus="onEditorFocus($event)"
165-
@ready="onEditorReady($event)">
166-
</quill-editor>
167-
168-
<!-- Or manually control the data synchronization(或手动控制数据流) -->
169-
<quill-editor :content="content"
170-
:options="editorOption"
171-
@change="onEditorChange($event)">
172-
</quill-editor>
98+
<!-- Two-way Data-Binding -->
99+
<quill-editor
100+
ref="myQuillEditor"
101+
v-model="content"
102+
:options="editorOption"
103+
@blur="onEditorBlur($event)"
104+
@focus="onEditorFocus($event)"
105+
@ready="onEditorReady($event)"
106+
/>
107+
108+
<!-- Or manually control the data synchronization -->
109+
<quill-editor
110+
:content="content"
111+
:options="editorOption"
112+
@change="onEditorChange($event)"
113+
/>
173114
</template>
174115
175116
<script>
176-
177-
// you can also register quill modules in the component
117+
// You can also register Quill modules in the component
178118
import Quill from 'quill'
179119
import { someModule } from '../yourModulePath/someQuillModule.js'
180120
Quill.register('modules/someModule', someModule)
@@ -184,12 +124,10 @@ Quill.register('modules/yourQuillModule', yourQuillModule)
184124
return {
185125
content: '<h2>I am Example</h2>',
186126
editorOption: {
187-
// some quill options
127+
// Some Quill options...
188128
}
189129
}
190130
},
191-
// manually control the data synchronization
192-
// 如果需要手动控制数据同步,父组件需要显式地处理changed事件
193131
methods: {
194132
onEditorBlur(quill) {
195133
console.log('editor blur!', quill)
@@ -217,26 +155,26 @@ Quill.register('modules/yourQuillModule', yourQuillModule)
217155
</script>
218156
```
219157

158+
### Projects Using vue-quill-editor
159+
- [Tamiat CMS](https://github.com/tamiat/tamiat/)
160+
- ...
220161

221-
## Modules
162+
### Modules
222163
- [quill-image-extend-module](https://github.com/NextBoy/quill-image-extend-module)
223164
- [quill-image-resize-module](https://github.com/kensnyder/quill-image-resize-module)
224165
- [quill-image-drop-module](https://github.com/kensnyder/quill-image-drop-module)
225166
- [quilljs-table](https://github.com/dost/quilljs-table)
226167
- [more modules...](https://github.com/search?o=desc&q=quill+module&s=stars&type=Repositories&utf8=%E2%9C%93)
227168

228169

229-
## Issues
170+
### Issues
230171
- [Add attributes from toolbar options](https://github.com/quilljs/quill/issues/1084)
231172
- [Option to insert an image from a URL](https://github.com/quilljs/quill/issues/893)
232173
- [How vue-quill-editor combine with the syntax highlighter module of highlight.js](https://github.com/surmon-china/vue-quill-editor/issues/39)
233174
- [配合 element-ui 实现上传图片/视频到七牛 demo](https://github.com/surmon-china/vue-quill-editor/issues/102)
234175
- [How to fix “Can’t find variable: Quill”, “Quill is undefined”, “window.Quill is undefined” errors when trying to use Quill modules that use Webpack in Nuxt/SSR](https://github.com/surmon-china/vue-quill-editor/issues/171#issuecomment-370253411)
235176

236177

237-
## Quill documents
238-
[Api docs](https://quilljs.com/docs/quickstart/)
239-
178+
### Quill
179+
[Quill API document](https://quilljs.com/docs/quickstart/)
240180

241-
## Author
242-
[Surmon](https://surmon.me)

examples/01-example.vue

Lines changed: 0 additions & 133 deletions
This file was deleted.

0 commit comments

Comments
 (0)