Skip to content
This repository was archived by the owner on Apr 6, 2020. It is now read-only.

Commit 2832b03

Browse files
author
Sohee Lee
committed
fix: change bundle file name and set tui.grid to external
1 parent 8288a3c commit 2832b03

File tree

10 files changed

+506
-775
lines changed

10 files changed

+506
-775
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": [
3-
"tui",
3+
"tui/es6",
44
"plugin:vue/base"
55
],
66
"parserOptions": {

CONTRIBUTING.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Explain the problem and include additional details to help maintainers reproduce
1818

1919
## Suggesting Enhancements
2020
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.
2222

2323
Create an issue and provide the following information:
2424

@@ -42,14 +42,13 @@ Unsure where to begin contributing to TOAST UI? You can start by looking through
4242
### Development WorkFlow
4343
- Set up your development environment
4444
- 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`
4646
- Make a pull request
4747

4848
### Development environment
4949
- Prepare your machine node and it's packages installed.
5050
- 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`
5352

5453
### Make changes
5554
#### Checkout a branch
@@ -58,12 +57,7 @@ Unsure where to begin contributing to TOAST UI? You can start by looking through
5857
- **gh-pages**: API docs, examples and demo
5958

6059
#### 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.
6761

6862
#### Commit
6963
Follow our [commit message conventions](./docs/COMMIT_MESSAGE_CONVENTION.md).

README.md

Lines changed: 45 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Vue wrapper for TOAST UI Editor
1+
# TOAST UI Editor for Vue
22

33
> This is Vue component wrapping [TOAST UI Editor](https://github.com/nhnent/tui.editor).
44
@@ -7,13 +7,12 @@
77
[![npm version](https://img.shields.io/npm/v/@toast-ui/vue-editor.svg)](https://www.npmjs.com/package/@toast-ui/vue-editor)
88
[![license](https://img.shields.io/github/license/nhnent/toast-ui.vue-editor.svg)](https://github.com/nhnent/toast-ui.vue-editor/blob/master/LICENSE)
99
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg)](https://github.com/nhnent/toast-ui.vue-editor/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
10-
[![code with hearth by NHN ent.](https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-NHN%20Ent.-brightgreen.svg)](https://github.com/nhnent)
10+
[![code with hearth by NHN Entertainment](https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-NHN%20Entertainment-ff1414.svg)](https://github.com/nhnent)
1111

1212
## 🚩 Table of Contents
1313
* [Collect statistics on the use of open source](#collect-statistics-on-the-use-of-open-source)
1414
* [Install](#-install)
1515
* [Using npm](#using-npm)
16-
* [Via Contents Delivery Network (CDN)](#via-contents-delivery-network-cdn)
1716
* [Usage](#-usage)
1817
* [Load](#load)
1918
* [Implement](#implement)
@@ -22,16 +21,23 @@
2221
* [Event](#event)
2322
* [Method](#method)
2423
* [Pull Request Steps](#-pull-request-steps)
25-
* [Setup](#setup)
26-
* [Develop](#develop)
27-
* [Pull Request Steps](#pull-request)
2824
* [Documents](#-documents)
2925
* [Contributing](#-contributing)
3026
* [License](#-license)
3127

3228
## Collect statistics on the use of open source
3329

34-
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+
3541
```js
3642
tui.usageStatistics = false;
3743
```
@@ -44,55 +50,55 @@ tui.usageStatistics = false;
4450
npm install --save @toast-ui/vue-editor
4551
```
4652

47-
### Via Contents Delivery Network (CDN)
48-
49-
TOAST UI products are available over the CDN powered by [TOAST Cloud](https://www.toast.com).
50-
51-
You can use the CDN as below.
52-
53-
```html
54-
<script src="https://uicdn.toast.com/toast-ui.vue-editor/latest/vue-editor.js"></script>
55-
```
56-
5753
## 🔨 Usage
5854

5955
If you want to more details, see [Tutorials](https://github.com/nhnent/toast-ui.vue-editor/blob/master/docs/getting-started.md) 👀
6056

6157
### Load
6258

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
6462

65-
If you use some kind of bundle loader like `webpack` of `rollup`, you can add the import like this:
6663
```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';
6867
import { Editor } from '@toast-ui/vue-editor'
69-
// commonjs require
70-
var ToustUI = require('@toast-ui/vue-editor'); // you can use toastui.Editor
7168
```
7269

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
7671

7772
```js
78-
import { Editor } from '@toast-ui/vue-editor/src/index'
73+
require('tui-editor/dist/tui-editor.css');
74+
require('tui-editor/dist/tui-editor-contents.css');
75+
require('codemirror/lib/codemirror.css');
76+
var toastui = require('@toast-ui/vue-editor');
77+
var Editor = toastui.Editor;
7978
```
8079

81-
* Using `<script>`
80+
* Using Single File Component
8281

83-
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+
```
8488

85-
```html
86-
<script src="path/to/vue-editor.js"></script>
89+
* Using namespace
90+
91+
```js
92+
var Editor = toastui.Editor;
8793
```
8894

8995
### Implement
9096

91-
First implement `<tui-editor>` in the template.
97+
First implement `<editor/>` in the template.
9298

9399
```html
94100
<template>
95-
<tui-editor/>
101+
<editor/>
96102
</template>
97103
```
98104

@@ -102,7 +108,7 @@ import { Editor } from '@toast-ui/vue-editor'
102108
103109
export default {
104110
components: {
105-
'tui-editor': Editor
111+
'editor': Editor
106112
}
107113
}
108114
```
@@ -112,7 +118,7 @@ import { Editor } from '@toast-ui/vue-editor'
112118
new Vue({
113119
el: '#app',
114120
components: {
115-
'tui-editor': Editor
121+
'editor': Editor
116122
}
117123
});
118124
```
@@ -125,14 +131,14 @@ In the example below, `editorText` is binding to the text of the editor.
125131

126132
```html
127133
<template>
128-
<tui-editor v-model="editorText"/>
134+
<editor v-model="editorText"/>
129135
</template>
130136
<script>
131137
import { Editor } from '@toast-ui/vue-editor'
132138
133139
export default {
134140
components: {
135-
'tui-editor': Editor
141+
'editor': Editor
136142
},
137143
data() {
138144
return {
@@ -200,18 +206,18 @@ const defaultOptions = {
200206
201207
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).
202208
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:
204210
205211
```html
206212
<template>
207-
<tui-editor ref="tuiEditor"/>
213+
<editor ref="tuiEditor"/>
208214
</template>
209215
<script>
210216
import { Editor } from '@toast-ui/vue-editor'
211217
212218
export default {
213219
components: {
214-
'tui-editor': Editor
220+
'editor': Editor
215221
},
216222
methods: {
217223
scroll() {

0 commit comments

Comments
 (0)