diff --git a/README.md b/README.md index 940d3d3..c44d02e 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,20 @@ For standalone usage: ``` +## 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 @@ -61,12 +75,6 @@ new Vue({ ``` -## 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 @@ -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,