JSFiddle - React, Tailwind, and code Playground
HTML
<div id="vue">
<input @paste="paste" placeholder="paste here">
<pre>{{text}}</pre>
<hr>
<pre>{{object}}</pre>
</div>
JavaScript
new Vue({
el: '#vue',
data: {
/* text: undefined,
object: undefined */
},
methods: {
paste(e) {
this.text = e.clipboardData.getData('text')
/* try{
this.object = JSON.parse(e.clipboardData.getData('text'))
} catch(error) {
this.object = error.message
} */
}
}
})