Skip to content

Commit

Permalink
Reorder README
Browse files Browse the repository at this point in the history
  • Loading branch information
Inndy committed May 17, 2018
1 parent 5075510 commit 0e0bbab
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ For standalone usage:
<script src="dist/vue-clipboard.min.js"></script>
```

## I want to copy texts without a specific button!

Yes, you can do it by using our new method: `this.$copyText`. See
[sample2](https://github.com/Inndy/vue-clipboard2/blob/master/sample2.html),
where we replace the clipboard directives with a v-on directive.

Modern browsers have some limitations like that you can't use `window.open` without a user interaction.
So there's the same restriction on copying things! Test it before you use it. Make sure you are not
using this method inside any async method.

Before using this feature, read:
[this issue](https://github.com/zenorocha/clipboard.js/issues/218) and
[this page](https://github.com/zenorocha/clipboard.js/wiki/Known-Limitations) first.

## Sample

```html
Expand Down Expand Up @@ -61,12 +75,6 @@ new Vue({
</script>
```

## I want to copy texts without a specific button!

Yes, you can do it by using our new method: `this.$copyText`. See
[sample2](https://github.com/Inndy/vue-clipboard2/blob/master/sample2.html),
where we replace the clipboard directives with a v-on directive.

## Sample 2

```html
Expand Down Expand Up @@ -110,14 +118,6 @@ You can use [your Vue instance ```vm.$el```](https://vuejs.org/v2/api/#vm-el) to

This will allow you to access the *rendered* content of your components, rather than the components themselves.

Modern browsers have some limitations like that you can't use `window.open` without a user interaction.
So there's the same restriction on copying things! Test it before you use it. Make sure you are not
using this method inside any async method.

Before using this feature, read:
[this issue](https://github.com/zenorocha/clipboard.js/issues/218) and
[this page](https://github.com/zenorocha/clipboard.js/wiki/Known-Limitations) first.

### Contribution

PRs welcome, and issues as well! If you want any feature that we don't have currently,
Expand Down

0 comments on commit 0e0bbab

Please sign in to comment.