Skip to content

upgrade to Vue.js v2.0.x #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The demo page is [HERE](http://haixing-hu.github.io/vue-html-editor/demo.html).

# Requirements

- [Vue.js](https://github.com/yyx990803/vue) `^1.0.24`
- [Vue.js](https://github.com/yyx990803/vue) `^2.0.0`
- [Summernote](https://github.com/summernote/summernote) `^0.8.1`

# Instllation
Expand All @@ -39,7 +39,7 @@ The HTML snippets are as follows:

```html
<div class="container" id="app">
<vue-html-editor name="html-editor" :model.sync="text"></vue-html-editor>
<vue-html-editor name="html-editor" refs="editor" :model="text"></vue-html-editor>
<div style="margin-top:40px">
<div> The HTML contents are as follows:</div>
<hr>
Expand All @@ -62,13 +62,18 @@ var vm = new Vue({
text: "Hello World!"
}
});

var editor = vm.$refs.editor;
editor.$on('input', function(inputed) {
vm.$data.text = inputed;
});
```

# Component Properties

## `model`

The model bind to the control, which must be a two way binding variable.
The model bind to the control.

Note that the value of model could be set to `null`, and in that case the
text content of the editor will be set to an empty string. While, if the text
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"node_modules"
],
"dependencies": {
"vue": "^1.0.26",
"vue": "^2.0.0",
"bootstrap": "^3.3.6",
"font-awesome": "^4.2.0",
"jquery": "^2.2.4",
Expand Down
Loading