You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 6, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+4-10Lines changed: 4 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Explain the problem and include additional details to help maintainers reproduce
18
18
19
19
## Suggesting Enhancements
20
20
In case you want to suggest for TOAST UI Editor, please follow this guideline to help maintainers and the community understand your suggestion.
21
-
Before creating suggestions, please check [issue list](https://github.nhnent.com/fe/tui.editor/labels/feature%20request) if there's already a request.
21
+
Before creating suggestions, please check [issue list](https://github.com/nhnent/toast-ui.vue-editor/labels/feature%20request) if there's already a request.
22
22
23
23
Create an issue and provide the following information:
24
24
@@ -42,14 +42,13 @@ Unsure where to begin contributing to TOAST UI? You can start by looking through
42
42
### Development WorkFlow
43
43
- Set up your development environment
44
44
- Make change from a right branch
45
-
- Be sure the code passes `npm run lint`, `npm run test`
45
+
- Be sure the code passes `npm run lint`
46
46
- Make a pull request
47
47
48
48
### Development environment
49
49
- Prepare your machine node and it's packages installed.
50
50
- Checkout our repository
51
-
- Install dependencies by `npm install && bower install`
52
-
- Start webpack-dev-server by `npm run serve`
51
+
- Install dependencies by `npm install`
53
52
54
53
### Make changes
55
54
#### Checkout a branch
@@ -58,12 +57,7 @@ Unsure where to begin contributing to TOAST UI? You can start by looking through
58
57
-**gh-pages**: API docs, examples and demo
59
58
60
59
#### Check Code Style
61
-
Run `npm run eslint` and make sure all the tests pass.
62
-
63
-
#### Test
64
-
Run `npm run test` and verify all the tests pass.
65
-
If you are adding new commands or features, they must include tests.
66
-
If you are changing functionality, update the tests if you need to.
60
+
Run `npm run lint` and make sure all the tests pass.
[](https://github.com/nhnent)
10
+
[](https://github.com/nhnent)
11
11
12
12
## 🚩 Table of Contents
13
13
*[Collect statistics on the use of open source](#collect-statistics-on-the-use-of-open-source)
Vue Wrapper of TOAST UI Editor applies Google Analytics (GA) to collect statistics on the use of open source, in order to identify how widely TOAST UI Editor is used throughout the world. It also serves as important index to determine the future course of projects. location.hostname (e.g. > “ui.toast.com") is to be collected and the sole purpose is nothing but to measure statistics on the usage. To disable GA, include tui-code-snippet.js and then immediately write the options as follows:
30
+
Vue Wrapper of TOAST UI Editor applies Google Analytics (GA) to collect statistics on the use of open source, in order to identify how widely TOAST UI Editor is used throughout the world. It also serves as important index to determine the future course of projects. location.hostname (e.g. > “ui.toast.com") is to be collected and the sole purpose is nothing but to measure statistics on the usage. To disable GA, use the following `usageStatistics` options when declare Vue Wrapper compoent.
31
+
32
+
```js
33
+
var options = {
34
+
...
35
+
usageStatistics:false
36
+
}
37
+
```
38
+
39
+
Or, include include `tui-code-snippet.js` (**v1.4.0** or **later**) and then immediately write the options as follows:
40
+
35
41
```js
36
42
tui.usageStatistics=false;
37
43
```
@@ -44,55 +50,55 @@ tui.usageStatistics = false;
44
50
npm install --save @toast-ui/vue-editor
45
51
```
46
52
47
-
### Via Contents Delivery Network (CDN)
48
-
49
-
TOAST UI products are available over the CDN powered by [TOAST Cloud](https://www.toast.com).
If you want to more details, see [Tutorials](https://github.com/nhnent/toast-ui.vue-editor/blob/master/docs/getting-started.md) 👀
60
56
61
57
### Load
62
58
63
-
* Using module
59
+
You can use Toast UI Editor for Vue as moudule format or namespace. Also you can use Single File Component (SFC of Vue). When using module format and SFC, you should load `tui-editor.css`, `tui-editor-contents.css` and `codemirror.css` in the script.
60
+
61
+
* Using Ecmascript module
64
62
65
-
If you use some kind of bundle loader like `webpack` of `rollup`, you can add the import like this:
66
63
```js
67
-
// es modules
64
+
import'tui-editor/dist/tui-editor.css';
65
+
import'tui-editor/dist/tui-editor-contents.css';
66
+
import'codemirror/lib/codemirror.css';
68
67
import { Editor } from'@toast-ui/vue-editor'
69
-
// commonjs require
70
-
var ToustUI =require('@toast-ui/vue-editor'); // you can use toastui.Editor
71
68
```
72
69
73
-
* Using only Vue wrapper component
74
-
75
-
`vue-eidtor.js` has all of the tui.editor. If you only need vue wrapper component, you can use `@toast-ui/vue-editor/src/index.js` like this:
70
+
* Using Commonjs module
76
71
77
72
```js
78
-
import { Editor } from '@toast-ui/vue-editor/src/index'
If you just add javascript file to your html, you use CDN or `vue-editor.js`downloaded. Insert`<script>`in your html like this:
82
+
```js
83
+
import 'tui-editor/dist/tui-editor.css';
84
+
import 'tui-editor/dist/tui-editor-contents.css';
85
+
import 'codemirror/lib/codemirror.css';
86
+
import Editor from '@toast-ui/vue-editor/src/editor.vue'
87
+
```
84
88
85
-
```html
86
-
<script src="path/to/vue-editor.js"></script>
89
+
* Using namespace
90
+
91
+
```js
92
+
var Editor = toastui.Editor;
87
93
```
88
94
89
95
### Implement
90
96
91
-
First implement `<tui-editor>`in the template.
97
+
First implement `<editor/>`in the template.
92
98
93
99
```html
94
100
<template>
95
-
<tui-editor/>
101
+
<editor/>
96
102
</template>
97
103
```
98
104
@@ -102,7 +108,7 @@ import { Editor } from '@toast-ui/vue-editor'
102
108
103
109
export default {
104
110
components: {
105
-
'tui-editor': Editor
111
+
'editor': Editor
106
112
}
107
113
}
108
114
```
@@ -112,7 +118,7 @@ import { Editor } from '@toast-ui/vue-editor'
112
118
new Vue({
113
119
el: '#app',
114
120
components: {
115
-
'tui-editor': Editor
121
+
'editor': Editor
116
122
}
117
123
});
118
124
```
@@ -125,14 +131,14 @@ In the example below, `editorText` is binding to the text of the editor.
125
131
126
132
```html
127
133
<template>
128
-
<tui-editor v-model="editorText"/>
134
+
<editor v-model="editorText"/>
129
135
</template>
130
136
<script>
131
137
import { Editor } from '@toast-ui/vue-editor'
132
138
133
139
export default {
134
140
components: {
135
-
'tui-editor': Editor
141
+
'editor': Editor
136
142
},
137
143
data() {
138
144
return {
@@ -200,18 +206,18 @@ const defaultOptions = {
200
206
201
207
If you want to more manipulate the Editor, you can use `invoke` method to call the method of tui.editor. For more information of method, see [method of tui.editor](http://nhnent.github.io/tui.editor/api/latest/ToastUIEditor.html).
202
208
203
-
First, you need to assign `ref` attribute of `<tui-editor/>` and then you can use `invoke` method through `this.$refs` like this:
209
+
First, you need to assign `ref` attribute of `<editor/>` and then you can use `invoke` method through `this.$refs` like this:
0 commit comments